Home > Database > Mysql Tutorial > 数据库-mysql查询每隔两个小时的数据。

数据库-mysql查询每隔两个小时的数据。

WBOY
Release: 2016-06-06 09:39:20
Original
2548 people have browsed it

mysql数据库

比如说我数据库里面的有两列分别是时间和数字,想要查询从初始时间”2012-07-11 01:00:00“以后每两个小时的数据之和。希望查询结果如下:
2012-07-11 03:00:00 14
2012-07-11 05:00:00 2
2012-07-11 07:00:00 25
。。。。。。。。。。。。。。依此类推。该段命令应该怎么写?望大神帮助。

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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template