sql语句按月份统计查询
生活随笔
收集整理的這篇文章主要介紹了
sql语句按月份统计查询
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
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
轉載于:https://www.cnblogs.com/xuxiaoshuan/p/4169043.html
總結
以上是生活随笔為你收集整理的sql语句按月份统计查询的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: php变量的判空和类型判断
- 下一篇: DBUtil工具