SQL to calculate difference between 2 latest recent values by event_types
<p>The events table looks like </p>

<pre><code>event_type     value        timestamp 
2               2           06-06-2016 14:00:00
2               7           06-06-2016 13:00:00
2               2           06-06-2016 12:00:00
3               3           06-06-2016 14:00:00
3               9           06-06-2016 13:00:00
4               9           06-06-2016 13:00:00
</code></pre>

<p>My goal is to filter event types that occur more than twice and subtract most two recent values and shows BY event_type.</p>

<p>The end result would be </p>

<pre><code>event_type    value 
2             -5
3             -6
</code></pre>

<p>I was able to get filter events occurred more than twice and order by event_type based on timestamp desc.
The difficult part for me is to subtract most two recent values and shows BY event_type.</p>

<p>DB / SQL experts , please help</p>