title: Breakdown SUM of INT by Each Month
body: <p>Query I use to find the total spend per station for a year. How do I break down the spend of each product by month i.e. each month as a column?</p>
  
  <p>e.DT is a datetime, but only gets populated once a month.</p>
  
  <pre><code>select s.StationID, sum(e.Spend)
  from Station s with(nolock)
  join Expenditure e with(nolock)
  on e.ProductID = s.ProductID
  where e.DT between '1 JAN 18' and '1 DEC 18'
  group by s.StationID
  order by sum(e.Spend) desc
  </code></pre>