I have this query that shows the number of flights each month, but the month appears in number format and I want to convert the month number as text.
Here is the query:
select to_char(f.departuretime, 'yyyy-mm') month, count(*) numberofflights
from flight f
group by to_char(f.departuretime, 'yyyy-mm')
order by numberofflights desc;
output:
MONTH NUMBEROFFLIGHTS
2022-05 7
2022-11 5
2022-08 3
... ...
I want to display the months like “2022-MAY” or just “MAY” and so on.