按月查询数据

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.

 

posted @ 2020-01-09 17:37  逆火狂飙  阅读(230)  评论(1)    收藏  举报
生当作人杰 死亦为鬼雄 至今思项羽 不肯过江东