/ Published in: SQL
Count the number of rows that fall within each Month
Expand |
Embed | Plain Text
SELECT TO_CHAR(TRUNC(create_time,'mm'),'Month YYYY') AS month, COUNT(*) FROM TABLE GROUP BY TRUNC(create_time,'mm') ORDER BY TRUNC(create_time,'mm') DESC ;
You need to login to post a comment.
