title: How to show data for each week in android?
body: <p>I have a problem in displaying the data in my application for each week?</p>
  
  <p>I can show the data by day using this code in my SQLite</p>
  
  <pre><code>SELECT substr(_id, 1, 7) as _id, sum(value) as total FROM pd_table GROUP BY _id order by _id desc
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/aFyFx.jpg" alt="This is the output after I execute the code above"></p>
  
  <p>I was also able to display the data based on the month by using this code</p>
  
  <pre><code>SELECT substr(_id, 1, 10) as _id, sum(value) as total FROM pd_table GROUP BY _id order by _id desc
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/XGHdh.jpg" alt="This is the output after I execute the code above"></p>
  
  <p>_id using SimpleDateFormat ("yyyy-MM-dd HH: mm: ss")</p>
  
  <p>now i want to display it every week. How?</p>
  
  <p>Any answer is very useful for me :)</p>