2
Hello, I would like to know how to solve this problem. I would like to take the name of the days of the month and sort them and not the numbers of the corresponding months. Follow the query I performed but ordered only in numbers corresponding to the months.
SELECT to_char(hsp_checkin, 'month') as "Mês",
count(hsp_id) as "Total de Hospedagens"
FROM HOSPEDAGENS
GROUP BY to_char(hsp_checkin, 'month');
Small correction in the description of the question. "I would like to take the name of the days of the month" actually is: I would like to take the name of the months.
ORDER BY 1 does not solve?
– anonimo
In case you want to sort by counting "Total Accommodation"?
– Confundir
Order by 1 does not solve it. I want to sort by the name of the months and not by the numbers that represent them. Ex: January, February, March, and no, April, August...
– Carlos Eduardo Guimarães