For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!
If you have a list of dates, how do you group by month, and then count the frequency of entries per month for each month?
Hi MMW, welcome to the communities. Do you look for something like this ?
< scott:op57@unxsy078 > select count(*), to_char(HIREDATE, 'yyyymm') 2 from emp t 3 group by to_char(HIREDATE, 'yyyymm') 4 order by 2; COUNT(*) TO_CHA ------------ ------ 1 198012 2 198102 1 198104 1 198105 1 198106 2 198109 1 198111 2 198112 1 198201 1 198704 1 198705
regards Kay btw please choose a more readable name for your avatar. You're more than a number. Have a look at this: Update Your Community Display Name and Avatar!
SELECT TO_CHAR(HIRE_DATE,'MON') HIRE_MONTH ,COUNT(*) CNT FROM EMP GROUP BY TO_CHAR(HIRE_DATE,'MON') ORDER BY HIRE_MONTH
BTW, this question has nothing to do with the subject of this forum, which is SQL Developer. The question is purely a SQL question, so belongs in the SQL & PL/SQL space.