Hello,
I've build a query that show me the total closed alarms past months. Query works fine except order by month.
select count (*) as Totaal, DATENAME(MONTH, ksubscribers.dbo.monitorAlarm.eventDateTime) as Maand
from ksubscribers.dbo.monitorAlarm
where monitorAlarmStateId = 2 and message not like '%geen-monitoring%'
group by DATENAME(MONTH,ksubscribers.dbo.monitorAlarm.eventDateTime)
order by Maand
Query order now by: Dec, Feb, Jan, Mar, Nov, Okt.
What im doing wrong.