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

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

WBOY
WBOYOriginal
2016-06-06 09:39:202455browse

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
。。。。。。。。。。。。。。依此类推。该段命令应该怎么写?望大神帮助。

Statement:
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