This is an automated email from the ASF dual-hosted git repository.

critas pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/iotdb-docs.git


The following commit(s) were added to refs/heads/main by this push:
     new 2eccafbb fix latest point query command in data query (#765)
2eccafbb is described below

commit 2eccafbb0a79a23dd15a5dd977f45feca298276c
Author: leto-b <[email protected]>
AuthorDate: Thu May 29 15:37:04 2025 +0800

    fix latest point query command in data query (#765)
---
 src/UserGuide/Master/Table/Basic-Concept/Query-Data.md    | 15 +++++++--------
 src/UserGuide/latest-Table/Basic-Concept/Query-Data.md    | 14 +++++++-------
 src/zh/UserGuide/Master/Table/Basic-Concept/Query-Data.md | 14 +++++++-------
 src/zh/UserGuide/latest-Table/Basic-Concept/Query-Data.md | 14 +++++++-------
 4 files changed, 28 insertions(+), 29 deletions(-)

diff --git a/src/UserGuide/Master/Table/Basic-Concept/Query-Data.md 
b/src/UserGuide/Master/Table/Basic-Concept/Query-Data.md
index 6f870740..d096be94 100644
--- a/src/UserGuide/Master/Table/Basic-Concept/Query-Data.md
+++ b/src/UserGuide/Master/Table/Basic-Concept/Query-Data.md
@@ -139,7 +139,6 @@ IoTDB> SELECT time, temperature, humidity
 Total line number = 7
 It costs 0.106s
 ```
-
 **Example 3:Multi device time aligned query**
 
 ```SQL
@@ -196,7 +195,7 @@ It costs 0.278s
 **Example**: Retrieve the latest record for each `device_id`, including the 
temperature value and the timestamp of the last record.
 
 ```SQL
-IoTDB> SELECT device_id,last(temperature),last_by(time,temperature) 
+IoTDB> SELECT device_id,last(time),last_by(temperature,time) 
          FROM table1 
          GROUP BY device_id;
 ```
@@ -204,12 +203,12 @@ IoTDB> SELECT 
device_id,last(temperature),last_by(time,temperature)
 **Result**:
 
 ```SQL
-+---------+-----+-----------------------------+
-|device_id|_col1|                        _col2|
-+---------+-----+-----------------------------+
-|      100| 90.0|2024-11-29T18:30:00.000+08:00|
-|      101| 90.0|2024-11-30T14:30:00.000+08:00|
-+---------+-----+-----------------------------+
++---------+-----------------------------+-----+
+|device_id|                        _col1|_col2|
++---------+-----------------------------+-----+
+|      100|2024-11-29T18:30:00.000+08:00| 90.0|
+|      101|2024-11-30T14:30:00.000+08:00| 90.0|
++---------+-----------------------------+-----+
 Total line number = 2
 It costs 0.090s
 ```
diff --git a/src/UserGuide/latest-Table/Basic-Concept/Query-Data.md 
b/src/UserGuide/latest-Table/Basic-Concept/Query-Data.md
index 2a450e73..d096be94 100644
--- a/src/UserGuide/latest-Table/Basic-Concept/Query-Data.md
+++ b/src/UserGuide/latest-Table/Basic-Concept/Query-Data.md
@@ -195,7 +195,7 @@ It costs 0.278s
 **Example**: Retrieve the latest record for each `device_id`, including the 
temperature value and the timestamp of the last record.
 
 ```SQL
-IoTDB> SELECT device_id,last(temperature),last_by(time,temperature) 
+IoTDB> SELECT device_id,last(time),last_by(temperature,time) 
          FROM table1 
          GROUP BY device_id;
 ```
@@ -203,12 +203,12 @@ IoTDB> SELECT 
device_id,last(temperature),last_by(time,temperature)
 **Result**:
 
 ```SQL
-+---------+-----+-----------------------------+
-|device_id|_col1|                        _col2|
-+---------+-----+-----------------------------+
-|      100| 90.0|2024-11-29T18:30:00.000+08:00|
-|      101| 90.0|2024-11-30T14:30:00.000+08:00|
-+---------+-----+-----------------------------+
++---------+-----------------------------+-----+
+|device_id|                        _col1|_col2|
++---------+-----------------------------+-----+
+|      100|2024-11-29T18:30:00.000+08:00| 90.0|
+|      101|2024-11-30T14:30:00.000+08:00| 90.0|
++---------+-----------------------------+-----+
 Total line number = 2
 It costs 0.090s
 ```
diff --git a/src/zh/UserGuide/Master/Table/Basic-Concept/Query-Data.md 
b/src/zh/UserGuide/Master/Table/Basic-Concept/Query-Data.md
index 415d62e5..6dd453e1 100644
--- a/src/zh/UserGuide/Master/Table/Basic-Concept/Query-Data.md
+++ b/src/zh/UserGuide/Master/Table/Basic-Concept/Query-Data.md
@@ -197,7 +197,7 @@ It costs 0.278s
 **示例:查询表中每个 `device_id` 返回最后一条记录,包含该记录的温度值以及在该设备中基于时间和温度排序的最后一条记录。**
 
 ```SQL
-IoTDB> SELECT device_id,last(temperature),last_by(time,temperature) 
+IoTDB> SELECT device_id,last(time),last_by(temperature,time) 
          FROM table1 
          GROUP BY device_id;
 ```
@@ -205,12 +205,12 @@ IoTDB> SELECT 
device_id,last(temperature),last_by(time,temperature)
 执行结果如下:
 
 ```SQL
-+---------+-----+-----------------------------+
-|device_id|_col1|                        _col2|
-+---------+-----+-----------------------------+
-|      100| 90.0|2024-11-29T18:30:00.000+08:00|
-|      101| 90.0|2024-11-30T14:30:00.000+08:00|
-+---------+-----+-----------------------------+
++---------+-----------------------------+-----+
+|device_id|                        _col1|_col2|
++---------+-----------------------------+-----+
+|      100|2024-11-29T18:30:00.000+08:00| 90.0|
+|      101|2024-11-30T14:30:00.000+08:00| 90.0|
++---------+-----------------------------+-----+
 Total line number = 2
 It costs 0.090s
 ```
diff --git a/src/zh/UserGuide/latest-Table/Basic-Concept/Query-Data.md 
b/src/zh/UserGuide/latest-Table/Basic-Concept/Query-Data.md
index 415d62e5..6dd453e1 100644
--- a/src/zh/UserGuide/latest-Table/Basic-Concept/Query-Data.md
+++ b/src/zh/UserGuide/latest-Table/Basic-Concept/Query-Data.md
@@ -197,7 +197,7 @@ It costs 0.278s
 **示例:查询表中每个 `device_id` 返回最后一条记录,包含该记录的温度值以及在该设备中基于时间和温度排序的最后一条记录。**
 
 ```SQL
-IoTDB> SELECT device_id,last(temperature),last_by(time,temperature) 
+IoTDB> SELECT device_id,last(time),last_by(temperature,time) 
          FROM table1 
          GROUP BY device_id;
 ```
@@ -205,12 +205,12 @@ IoTDB> SELECT 
device_id,last(temperature),last_by(time,temperature)
 执行结果如下:
 
 ```SQL
-+---------+-----+-----------------------------+
-|device_id|_col1|                        _col2|
-+---------+-----+-----------------------------+
-|      100| 90.0|2024-11-29T18:30:00.000+08:00|
-|      101| 90.0|2024-11-30T14:30:00.000+08:00|
-+---------+-----+-----------------------------+
++---------+-----------------------------+-----+
+|device_id|                        _col1|_col2|
++---------+-----------------------------+-----+
+|      100|2024-11-29T18:30:00.000+08:00| 90.0|
+|      101|2024-11-30T14:30:00.000+08:00| 90.0|
++---------+-----------------------------+-----+
 Total line number = 2
 It costs 0.090s
 ```

Reply via email to