title: SQL Query for YTD, MTD, WTD totals
body: <p>I would like this query to be able to automagically know today's date &amp; time as well as the first of the year (or month) (or week)...</p>
  
  <pre><code>SELECT TicketID
  FROM   Ticket
  WHERE     (Ticket.DtCheckOut &gt; '1/1/2011 12:00:00 AM') 
        AND (Ticket.DtCheckOut &lt; '8/27/2011 12:00:00 AM')
  </code></pre>
  
  <p>I know it will use <code>GETDATE()</code> in some form, but you don't want to see what I've come up with, I promise!</p>
  
  <p>Here is what I was reading on <code>GETDATE()</code> <a href="http://msdn.microsoft.com/en-us/library/ms188383.aspx" rel="nofollow">MDSN: GETDATE(Transact-SQL)</a></p>
  
  <p>I looked around here and Google - and didn't find anything 'clean' - so any input would be awesome!</p>