interval设置超过4h时,查询显示异常,数据库版本3.0.1.6 #22811
Replies: 1 comment
-
前面说错了, |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
比如设置interval(1h):
select first(ia),first(_time) from table_a where _time>='2023-06-22 00:00:00' and _time<'2023-06-23 00:00:00' and _tg_device_id = '654427730204426240' interval(1h) fill(null);
结果:
first(ia)|first(_time) |
---------+-----------------------+
10.23|2023-06-22 00:00:11.242|
7.51|2023-06-22 01:00:11.237|
6.85|2023-06-22 02:00:11.245|
0.08|2023-06-22 03:00:11.235|
5.67|2023-06-22 04:00:11.230|
9.38|2023-06-22 05:00:11.236|
0.37|2023-06-22 06:00:11.230|
5.68|2023-06-22 07:00:11.233|
3.63|2023-06-22 08:00:11.230|
2.39|2023-06-22 09:00:11.232|
4.68|2023-06-22 10:00:11.229|
0.69|2023-06-22 11:00:11.241|
5.51|2023-06-22 12:00:11.241|
6.94|2023-06-22 13:00:11.231|
5.83|2023-06-22 14:00:11.230|
2.47|2023-06-22 15:00:11.229|
4.81|2023-06-22 16:00:11.233|
10.64|2023-06-22 17:00:11.235|
5.47|2023-06-22 18:00:11.230|
6.68|2023-06-22 19:00:11.235|
2.22|2023-06-22 20:00:11.241|
5.8|2023-06-22 21:00:11.229|
1.99|2023-06-22 22:00:11.229|
9.59|2023-06-22 23:00:11.235|
结果是正常的
比如设置interval(5h):
select first(ia),first(_time) from table_a where _time>='2023-06-22 00:00:00' and _time<'2023-06-23 00:00:00' and _tg_device_id = '654427730204426240' interval(5h) fill(null);
结果:
first(ia)|first(_time) |
---------+-----------------------+
10.23|2023-06-22 00:00:11.242|
0.08|2023-06-22 03:00:11.235|
3.63|2023-06-22 08:00:11.230|
6.94|2023-06-22 13:00:11.231|
5.47|2023-06-22 18:00:11.230|
9.59|2023-06-22 23:00:11.235|
第二条出现问题:
结果为: 0.08|2023-06-22 03:00:11.235|,取的不是5点的数据,而是3点的数据
Beta Was this translation helpful? Give feedback.
All reactions