To get the count of employees joined for the last 3 years, month_year wise
880216Dec 29 2011 — edited Jan 4 2012select emp_id,count(emp_id),TO_CHAR (join_date, 'MON')|| ' '|| TO_CHAR (join_date, 'YYYY') month_year
from employee
where TRUNC (MONTHS_BETWEEN (SYSDATE, join_date)) < 36
group by emp_id,TO_CHAR (join_date, 'MON')|| ' '|| TO_CHAR (join_date, 'YYYY');
To get the count of employees joined for the last 3 years, month_year wise. It gives me output but I need those months also when no employee joined with count as zero. How can I do it.