title: PostgreSQL: running count of rows for a query 'by minute'
body: <p>I need to query for each minute the total count of rows up to that minute.</p>
  
  <p>The best I could achieve so far doesn't do the trick. It returns count per minute, not the total count up to each minute:</p>
  
  <pre><code>SELECT COUNT(id) AS count
       , EXTRACT(hour from "when") AS hour
       , EXTRACT(minute from "when") AS minute
    FROM mytable
   GROUP BY hour, minute
  </code></pre>