title: Count data from last week in sql server
body: <p>I'm trying to do a count on all of the data from last week <strong>(Monday - Sunday)</strong>. But it seems like it's ignoring Sunday for some reason and this way I'm not getting the correct count:</p>
  
  <pre><code>    SET DATEFIRST 1
      Select *
      FROM Products a
      inner join Locations b
      on a.Location = b.LocID
      where b.LocID = 12 AND
      a.Created &gt;= DATEADD(week, DATEDIFF(week,0,GETDATE())-1,-1)
      AND a.Created &lt; DATEADD(week, DATEDIFF(week,0,GETDATE()),-1)
  </code></pre>