Forum Replies Created

Viewing post 31 (of 31 total)

  • RE: Totals for each month in a date range query

    you could take what theSQLGuru wrote and make it generalizable for all years with Datepart functions.

    select sum(case when datepart(mm,Invoice_date)=1 then Total_Amount else 0 end ) as Jan,

    sum(case...

Viewing post 31 (of 31 total)