title: How to show YTD last year vs Same period this year
body: <p>i have this query that is showing me the same period of days from this month 2016 and the same month 2015,</p>
  
  <p>But i need to show YTD </p>
  
  <p>Ene, feb, mar, apr, may, jun, up to Jul 6 2015 and same period 2016 (because today is the 6th and tomorrow show 7th then 8th july and so on) Meaning that is something similar to the code i have but instead of showing me just the current month i need YTD. </p>
  
  <pre><code>SELECT        OrderStatus, Sum_SellPrice, Sum_SellerMargin, Sum_BuyPrice, OrderDate
  FROM            Sum_OrderCharges
  WHERE        (OrderStatus IN ('Completed', 'Invoiced', 'Open')) 
  AND (OrderPeriodYear IN ('2015','2016')) 
  AND (MONTH(OrderDate) = MONTH(GETDATE())) 
  and (day(OrderDate) &lt;= DAY(GETDATE())) 
  ORDER BY OrderDate
  </code></pre>