This is my employee table
empid name Date_of_joining
1 dilip 2010-01-30
2 suresh 2001-03-01
3 ramesh 2003-01-01
I want to get the number of employees with total employees group by employee date of joining
expected output
year new joining total employees
2001 10 10
2002 12 22
2003 15 27
query
select YEAR(`DATE_OF_JOINING`) as 'year', COUNT(*) as 'count1',sum(count(*)) from employee
GROUP BY YEAR(`DATE_OF_JOINING`)