Hi
I'm trying to output the previous 12 months and have the month name as the column heading. It doesnt want to let me use a function as the alias.
SELECT Department,
SUM(case when Month=MONTH((CURDATE() - INTERVAL 11 MONTH)) then Total else '0' end) AS DATE_FORMAT((CURDATE() - INTERVAL 11...