select to_char(created_datetime,'yyyy-MM') as month,count(*) from DELIVERY_HISTORY group by to_char(created_datetime,'yyyy-MM') order by month;
SQL> select to_char(created_datetime,'yyyy-MM') as month,count(*) from DELIVERY_HISTORY group by to_char(created_datetime,'yyyy-MM') order by month; MONTH COUNT(*) ------- ---------- 2019-03 1382128 2019-04 1507524 2019-05 1532834 2019-06 1836512 2019-07 1934621 2019-08 1643136 2019-09 1963849 2019-10 1776988 2019-11 2198378 2019-12 3056310 2020-01 647108 11 rows selected.