sql查询一年每个月的数据量

select count(*) number,mid(warn_time,1,7) as month from tab_warn where warn_time between '2021-01-01 00:00:00' and '2021-12-31 23:59:59' group by month

 

posted @ 2021-11-17 14:10  丙炎  阅读(638)  评论(0)    收藏  举报