Home > Database > Mysql Tutorial > mysql按时间分段统计数据

mysql按时间分段统计数据

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-06 09:35:02
Original
1161 people have browsed it

mysql

表结构:
+----------------+--------------+
| time | num |
+----------------+--------------+
| 1256278360 | 10000000 |
| 1256278370 | 10000000 |
| 1256278380 | 10000000 |
| 1256278390 | 10000000 |
| 1256278480 | 10000000 |
| 1256278490 | 10000000 |
| 1256278580 | 10000000 |
| 1256278590 | 10000000 |
| 1256278600 | 10000000 |
| 1256278670 | 10000000 |
| 1256278680 | 10000000 |
| 1256278690 | 10000000 |
| 1256279810 | 10000000 |
| 1256279820 | 10000000 |
| 1256279830 | 10000000 |
| 1256279840 | 10000000 |

如何查询time字段每隔15秒/30秒/1分钟段的sum值,也就是汇总时间段内多条数据为一条,可以将数据库分段,可就是不知道该怎么分,求大神指导...

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
MySQL stops process
From 1970-01-01 08:00:00
0
0
0
Error when installing mysql on linux
From 1970-01-01 08:00:00
0
0
0
phpstudy cannot start mysql?
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template