mysql 按周、日进行数据统计
来源:互联网 发布:淘宝展现量怎么算 编辑:程序博客网 时间:2024/05/18 06:36
-- 按周进行统计
select concat_ws(',',year(createDate),week(createDate)) as weekflg, count(*) as cnt from t_operate_log
where
createDate<='2015-2-21' and createDate>='2013-1-09'
-- year(createDate)=2015
group by weekflg
-- 按日进行统计
select date(createDate) as weekflg, count(*) as cnt from t_operate_log
where
createDate<='2015-1-11' and createDate>='2015-1-09'
group by weekflg
select concat_ws(',',year(createDate),week(createDate)) as weekflg, count(*) as cnt from t_operate_log
where
createDate<='2015-2-21' and createDate>='2013-1-09'
-- year(createDate)=2015
group by weekflg
-- 按日进行统计
select date(createDate) as weekflg, count(*) as cnt from t_operate_log
where
createDate<='2015-1-11' and createDate>='2015-1-09'
group by weekflg
0 0
- mysql 按周、日进行数据统计
- MYSQL中GROUP BY进行数据统计
- 使用批处理进行mysql数据统计并上传
- 使用shell进行mysql数据统计并上传
- Mysql分表数据通过Shell进行导出与统计
- Mysql分表数据通过Python进行汇总统计
- Mysql 分别按月, 日为组group,进行统计排序order
- MySql按日期进行统计
- MySQL按照月进行统计
- 数据集中进行记录统计
- 运用PostgreSQL进行数据统计
- sqlserver数据导入mysql七: 对mysql和sqlsever同一张表中的数据进行统计对比
- Linux下通过php对Mysql中的数据进行定时统计并入库
- Python利用groupby模块进行Mysql分表数据的汇总统计
- mysql中的数据统计方法
- MySQL数据、索引信息统计
- mysql,oracle统计重复数据
- mysql 数据统计 分区函数
- 秒杀多线程第十五篇 关键段,事件,互斥量,信号量的“遗弃”问题
- linux /var/log/secure 日志不记录问题
- iOS开发的一些奇巧淫技1
- Linux命令学习:md5sum
- POJ-2155(二维树状数组)
- mysql 按周、日进行数据统计
- SharePoint 网站集 升级到SharePoint2013 的方法(重点 是一个新的概念创建,升级评估网站)
- iOS开发的一些奇巧淫技2
- iOS开发的一些奇巧淫技3
- FreeMarker内置函数及其用法
- 关于一个抓取网站图片脚本的解析
- 在Ubuntu 14.04平台上利用Intel的GPU实现硬件加速--基于VAAPI
- ubuntu 13.10下安装vmware workstation 11
- 连号区间数 小明这些天一直在思考这样一个奇怪而有趣的问题: