iotdb1.3.1下如何写按每小时刻度求和聚合查询
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
Research direction
Start with the IoTDB SQL query and aggregation documentation, using start_cli or DBeaver to reproduce the hourly sample and the one-year range. Determine whether the documented query features support grouping all records by hour-of-day, and consider the result complete when a tested query or a clear limitation is documented.
Written by the indexing model from the issue text.
Description
查询过去1年的数据,原始数据是写在整点的每小时1个点的数据
1天的原始数据如下
IoTDB> select C from root.A.B
> where time >= 2025-01-01T00:00:00.000
> and time < 2025-01-02T00:00:00.000
+-----------------------------+-------------------------+
| Time|root.A.B.C|
+-----------------------------+-------------------------+
|2025-01-01T00:00:00.000+08:00| 1324.0|
|2025-01-01T01:00:00.000+08:00| 1390.0|
|2025-01-01T02:00:00.000+08:00| 916.0|
|2025-01-01T03:00:00.000+08:00| 1436.0|
|2025-01-01T04:00:00.000+08:00| 2714.0|
|2025-01-01T05:00:00.000+08:00| 2172.0|
|2025-01-01T06:00:00.000+08:00| 1932.0|
|2025-01-01T07:00:00.000+08:00| 9294.0|
|2025-01-01T08:00:00.000+08:00| 11974.0|
|2025-01-01T09:00:00.000+08:00| 10364.0|
|2025-01-01T10:00:00.000+08:00| 6018.0|
|2025-01-01T11:00:00.000+08:00| 5322.0|
|2025-01-01T12:00:00.000+08:00| 3600.0|
|2025-01-01T13:00:00.000+08:00| 1852.0|
|2025-01-01T14:00:00.000+08:00| 1312.0|
|2025-01-01T15:00:00.000+08:00| 692.0|
|2025-01-01T16:00:00.000+08:00| 1484.0|
|2025-01-01T17:00:00.000+08:00| 4562.0|
|2025-01-01T18:00:00.000+08:00| 3532.0|
|2025-01-01T19:00:00.000+08:00| 3540.0|
|2025-01-01T20:00:00.000+08:00| 2586.0|
|2025-01-01T21:00:00.000+08:00| 6798.0|
|2025-01-01T22:00:00.000+08:00| 11088.0|
|2025-01-01T23:00:00.000+08:00| 6404.0|
+-----------------------------+-------------------------+
Total line number = 24
It costs 0.148s
然后全年数据按照0-24小时刻度分组求和
全年0点-1点的数据累计在0点刻度
全年1点-2点的数据累计在1点刻度
以此类推
这样的sql查询要怎么写呢?好像实现不了
目前使用的工具主要是start_cli和dbeaver
- Dominant language
- Java
- Stars
- 6.4k
- Forks
- 1.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 284
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apache/iotdb
-
[Bug] Python NumpyTablet silently drops trailing zero bytes from BLOB valuesPossibly taken @DaZuiZui claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
[Bug] sbin/replace-conf-from-env.sh word-splits the whole environment and corrupts iotdb-system.propertiesPossibly taken @anishmehta24 claimed this 69 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
apache/iotdb#18655 · 1 reaction ·
Maintainers usually reply within 1 day
-
IoTDB Edge: stop-edge.sh does not stop its own process when IOTDB_HOME is set, and reports successPossibly taken @PDGGK claimed this 88 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
[Bug] findColumn throws NullPointerException instead of SQLException for an unknown column namePossibly taken @PDGGK claimed this 130 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
Similar issues
-
Android Bug Core Drape
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
organicmaps/organicmaps#14449 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
openhab/openhab-addons#22512 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
objectionary/lints#1871 ·
Maintainers usually reply within 1 day
-
help wanted maintenance
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
apache/maven-war-plugin#694 ·
Maintainers usually reply within 1 day
-
help wanted maintenance
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
apache/maven-resolver-ant-tasks#219 ·
Maintainers usually reply within 1 day