title: How to sum total time utilize in each week of a month?
body: <p>In mysql db I have a field named <strong>time_utilize</strong> with type <strong>time</strong> which store total time spend in a day and that table contain records for every month. Now I want to find total time spend by a user in each week of a selected month. I searched for that but I found an excellent query to find total time spend in whole month which is:</p>
  
  <pre><code>SELECT Sec_to_Time(Sum(Time_to_Sec(time_utilize))) FROM attendance WHERE staff_id = 'sajid'
  </code></pre>
  
  <p>Now who can I find the sum of total time utilize in each week of a month?</p>
  
  <p><img src="https://i.stack.imgur.com/h3Piu.gif" alt="The below image is the resultant table"></p>