您的位置:首页 > 博客中心 > 数据库 >

sql语句按月份统计查询

时间:2022-03-14 03:56

select year(createdate) 年,
month(createdate) 月,
count(1)
from public_cms_arc
where
(userid in
(select id from  cms_admin where userid=‘392‘) or userid=‘392‘)
group by year(createdate),
month(createdate)
order by year(createdate) desc,month(createdate) desc

热门排行

今日推荐

热门手游