title: Weekly Group by not including Sunday
body: <p>I am grouping the data by week in the following queries </p>
  
  <pre><code> select id,sum(quantity) ,dateadd(wk, datediff(wk,0, [createddate]), 0) from table1 where    
   createddate &gt;= '2017-10-02' and createddate &lt;= '2017-11-12'  
   and [id] = 111      
   group by [id] , dateadd(wk, datediff(wk,0, [createddate]), 0) 
  </code></pre>
  
  <p>Its grouping the data upto Sat i.e. Mon - Sat, not Mon to Sun. Can someone explain what I am missing.</p>
  
  <p>I cannot change the database start day</p>
  
  <p>Sample data is :</p>
  
  <ul>
  <li>02/10/2017 9.00 </li>
  <li>03/10/2017 10.50  </li>
  <li>04/10/2017 10.00 </li>
  <li>08/10/2017 1.00</li>
  </ul>