Tuesday, February 10, 2015

DISPLYING EMP DETAILS MONTH WISE WITH MONTH NAME



select datepart (month, HIRE_DATE) 'month', count(*) 'no of employees'
from EMPLOYEE_NANDU group by datepart(month,HIRE_DATE)

-----DISPLYING EMP DETAILS MONTH WISE WITH MONTH NAME---------

SELECT  MONTH=DATENAME(MM,HIRE_DATE) , count(*) 'no of employees'
FROM EMPLOYEE_NANDU GROUP BY DATENAME(MM,HIRE_DATE)

----DISPLAYING NAMES MONTH WISE AND NO OF EMPS AND NAMES--------------

No comments:

Post a Comment