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

hui pushed a commit to branch lmh/docUpdate
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit 0c37b72157153100af1ec5965703378ab8b57eb9
Author: Minghui Liu <[email protected]>
AuthorDate: Wed Nov 2 16:37:30 2022 +0800

    update Last-Query
---
 docs/UserGuide/Query-Data/Last-Query.md    | 16 ++++++++--------
 docs/zh/UserGuide/Query-Data/Last-Query.md | 20 ++++++++++----------
 2 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/docs/UserGuide/Query-Data/Last-Query.md 
b/docs/UserGuide/Query-Data/Last-Query.md
index 80134b4087..d3c433c5e4 100644
--- a/docs/UserGuide/Query-Data/Last-Query.md
+++ b/docs/UserGuide/Query-Data/Last-Query.md
@@ -33,15 +33,17 @@ select last <Path> [COMMA <Path>]* from < PrefixPath > 
[COMMA < PrefixPath >]* <
 
 which means: Query and return the last data points of timeseries 
prefixPath.path.
 
-Only time filter is supported in \<WhereClause\>. Any other filters given in 
the \<WhereClause\> will give an exception. When the cached most recent data 
point does not satisfy the criterion specified by the filter, IoTDB will have 
to get the result from the external storage, which may cause a decrease in 
performance.
+- Only time filter is supported in \<WhereClause\>. Any other filters given in 
the \<WhereClause\> will give an exception. When the cached most recent data 
point does not satisfy the criterion specified by the filter, IoTDB will have 
to get the result from the external storage, which may cause a decrease in 
performance.
 
-The result will be returned in a four column table format.
+- The result will be returned in a four column table format.
 
-```
-| Time | timeseries | value | dataType |
-```
+    ```
+    | Time | timeseries | value | dataType |
+    ```
+    
+    **Note:** The `value` colum will always return the value as `string` and 
thus also has `TSDataType.TEXT`. Therefore, the column `dataType` is returned 
also which contains the _real_ type how the value should be interpreted.
 
-**Note:** The `value` colum will always return the value as `string` and thus 
also has `TSDataType.TEXT`. Therefore, the column `dataType` is returned also 
which contains the _real_ type how the value should be interpreted.
+- We can use `ORDER BY TIMESERIES (DESC | ASC)` to specify that the result set 
is sorted in descending/ascending order by timeseries name.
 
 **Example 1:** get the last point of root.ln.wf01.wt01.status:
 
@@ -70,8 +72,6 @@ Total line number = 2
 It costs 0.002s
 ```
 
-## Order By timeseries
-
 **Example 3:** get the last points of all sensor in root.ln.wf01.wt01, and 
order the result by the timeseries column desc
 
 ```
diff --git a/docs/zh/UserGuide/Query-Data/Last-Query.md 
b/docs/zh/UserGuide/Query-Data/Last-Query.md
index 2084cc0823..21aef7f360 100644
--- a/docs/zh/UserGuide/Query-Data/Last-Query.md
+++ b/docs/zh/UserGuide/Query-Data/Last-Query.md
@@ -29,17 +29,19 @@ SQL 语法:
 select last <Path> [COMMA <Path>]* from < PrefixPath > [COMMA < PrefixPath >]* 
<whereClause> [ORDER BY TIMESERIES (DESC | ASC)?]
 ```
 
-其含义是:查询时间序列 prefixPath.path 中最近时间戳的数据。
+其含义是: 查询时间序列 prefixPath.path 中最近时间戳的数据。
 
-`whereClause` 中当前只支持时间过滤条件,任何其他过滤条件都将会返回异常。当缓存的最新点不满足过滤条件时,IoTDB 
需要从存储中获取结果,此时性能将会有所下降。
+- `whereClause` 中当前只支持时间过滤条件,任何其他过滤条件都将会返回异常。当缓存的最新点不满足过滤条件时,IoTDB 
需要从存储中获取结果,此时性能将会有所下降。
 
-结果集为四列的结构:
+- 结果集为四列的结构:
 
-```
-+----+----------+-----+--------+
-|Time|timeseries|value|dataType|
-+----+----------+-----+--------+
-```
+    ```
+    +----+----------+-----+--------+
+    |Time|timeseries|value|dataType|
+    +----+----------+-----+--------+
+    ```
+
+- 可以使用 `ORDER BY TIMESERIES (DESC | ASC)` 指定结果集按照序列名降序/升序排列。
 
 **示例 1:** 查询 root.ln.wf01.wt01.status 的最新数据点
 
@@ -68,8 +70,6 @@ Total line number = 2
 It costs 0.002s
 ```
 
-## 将结果集根据序列名进行排序
-
 **示例 3:** 查询 root.ln.wf01.wt01 下所有序列的最新数据点,并按照序列名降序排列。
 
 ```

Reply via email to