Hi All,
I have a doubt on how to perform the following:
I'd need to display hiredate from the table employees, grouping by month and year, excluding days, so I did the following
select to_char(hiredate,'mon/yyyy') from employees group by to_char(hiredate,'mon/yyyy')
Now I would need to order by hiredate ( just month and year ) but I can't, It let me order just by to_char(hiredate,'mon/yyyy') which is a string, this returns alphabetical order instead of date chronological order
I also tried order by to_date(to_char(hiredate,'mon/yyyy'),'mon/yyyy') but it orders by day month and year while I need to order just by month and year
Any help appreciated
thank you !