title: get weekly sum data from table using sqlite
body: <p>I tried some queries but non will work for me,i have to show app data in listview from sqlite table which having duplicates by sum total this week. </p>
  
  <p>query i tried </p>
  
  <ol>
  <li><p><code>String selectQuery = "SELECT  * FROM " + TABLE_APPDATA + " WHERE DATE( date_time ) &gt;= DATE('now', 'weekday 0', '-7 days')";</code></p></li>
  <li><p><code>"SELECT strftime('%Y-%W', date_time ) as date_time, sum(app_data) FROM "+TABLE_APPDATA+ " GROUP BY date_time order by app_data desc"</code></p></li>
  </ol>
  
  <p><code>Table app_data</code></p>
  
  <pre><code>------------------------------------------
  app_uid | date_time | app_name | app_data|
  10118   | 12-6-2016 |Google App| 200     |
  10158   | 12-6-2016 | Youtube  | 300     |
  10001   | 12-6-2016 | updater  | 100     |
  10158   | 13-6-2016 | Youtube  | 500     |
  ------------------------------------------
  </code></pre>
  
  <p>Here duplicates are there have to sum app_data i.e Youtube 800, any query for that would be thankful</p>