title: Using GROUP BY to fetch rows from SQLiteDatabase and then render them using SimpleCursorAdapter
body: <p>I want to display total amount of seconds that was spent each day on a project.</p>
  
  <p>I want to use SQLiteDatabase to fetch rows using the query below and then use SimpleCursorAdapter to fill a ListView.</p>
  
  <pre><code>SELECT projectId, date, sum(endedAt-startedAt) as hours
  FROM project_reports
  WHERE startedAt &gt;= 1270098000
  AND endedAt &lt;= 1272776399
  GROUP BY date, projectId
  </code></pre>