title: SQL to get number count per minute
body: <p>I have a dataset like:</p>
  
  <pre><code>id       name      updated_at
  1        test1     2014-06-30 09:00:00
  1        test2     2014-06-30 09:01:10
  1        test3     2014-06-30 09:01:23
  1        test4     2014-06-30 09:01:43
  1        test5     2014-06-30 09:02:02
  1        test6     2014-06-30 09:02:34
  1        test7     2014-06-30 09:03:22
  1        test8     2014-06-30 09:03:28
  </code></pre>
  
  <p>I need to get a count of the rows by minute for the last ten minutes. So it should always return ten numbers being the count of the rows that were updated last. Any ideas on how to do it and efficiently?</p>