I have a query which needs to group by year.
select distinct emp.id, emp.name, emp.joining_on from employee;
Output:
id ----