title: Filtering timestamps that happened within 5 minutes of each other.
body: <p>I'm trying to find glucose results for samples that were done within the last five minutes and filter them out. Below is my PostgreSQL Code and it's output. </p>
  
  <pre><code>SELECT date
         , blood_glucose
         , extract(epoch from date - lag(date) OVER(ORDER BY date))/60 
  FROM glucose
  ORDER BY DATE
  
  
  date               |glucose|minutes since last    
  ----------------------------------------------
  2017-10-02 08:05:00|183    |681
  2017-10-04 08:19:00|275    |2894
  2017-10-05 08:03:00|273    |1424
  2017-10-05 08:03:00|294    |0
  2017-10-05 08:04:00|277    |1
  2017-10-05 18:19:00|187    |615
  2017-10-09 21:26:00|190    |5947
  </code></pre>
  
  <p>I'm trying to get a result as such:</p>
  
  <pre><code>date               |glucose|minutes since last    
  ----------------------------------------------
  2017-10-05 08:03:00|273    |1424
  2017-10-05 08:03:00|294    |0
  2017-10-05 08:04:00|277    |1
  </code></pre>
  
  <p>I want to get all tests that happened within 5 mins. Not sure how I can contain the first one in this case the very first row with glucose level 273.</p>