如何更改下面的查询以获得 2 小时而不是 1 小时
SELECT DATE_FORMAT(x.time,'%Y-%m-%d %H:00:00')
, avg(Ph) avg_Ph
FROM Ph x where time >= NOW() - INTERVAL 1 DAY
GROUP
BY DATE_FORMAT(x.time,'%Y-%m-%d %H:00:00');
如何更改下面的查询以获得 2 小时而不是 1 小时
SELECT DATE_FORMAT(x.time,'%Y-%m-%d %H:00:00')
, avg(Ph) avg_Ph
FROM Ph x where time >= NOW() - INTERVAL 1 DAY
GROUP
BY DATE_FORMAT(x.time,'%Y-%m-%d %H:00:00');