oracle - Sql query alternative way -


i want find

select no of employees joined respect year , month employee table

my query is:

select to_char(joining_date,'yyyy') "year",        to_char(joining_date,'mm') "month",        count(first_name)    employee  group to_char(joining_date,'yyyy'),           to_char(joining_date,'mm'); 

no error, runs successfully.

is there alternative way same results query?

if group year , month, can following:

select to_char(joining_date, 'mm-yyyy'), count(first_name) test_date group to_char(joining_date, 'mm-yyyy') 

Comments

Popular posts from this blog

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -

YouTubePlayerFragment cannot be cast to android.support.v4.app.Fragment -