0
In the development of a query, I’m having a problem sorting the months. For example, in the chart appear to me first April, then January, June, August... And what I wanted to get, was the order of those same months, January 1, February, March...
Query
Set Language 'Portuguese'
SELECT DateName(mm,DataEntrada) as DataEntrada, COUNT(ID_Reserva) TotalReservas
From Reserva
group by DateName(mm,DataEntrada)
Order by DataEntrada
Can you put examples of dates? If the field "Date input" is a date field should show correctly, or are months of different years?
– Ricardo Pontual
Monthly data should be summed up without considering the possibility that data of more than one year for the same month?
– José Diz