You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by hu...@apache.org on 2022/11/02 09:00:11 UTC

[iotdb] 01/09: update query overview

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 c87ae422c0ce0f6d299ae29e2a32d07720875771
Author: Minghui Liu <li...@foxmail.com>
AuthorDate: Wed Nov 2 15:01:02 2022 +0800

    update query overview
---
 docs/UserGuide/Query-Data/Overview.md    | 16 ++++++++--------
 docs/zh/UserGuide/Query-Data/Overview.md | 16 ++++++++--------
 2 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/docs/UserGuide/Query-Data/Overview.md b/docs/UserGuide/Query-Data/Overview.md
index 28b8ad2002..ab751b8ec2 100644
--- a/docs/UserGuide/Query-Data/Overview.md
+++ b/docs/UserGuide/Query-Data/Overview.md
@@ -26,25 +26,25 @@
 In IoTDB, `SELECT` statement is used to retrieve data from one or more selected time series. Here is the syntax definition of `SELECT` statement:
 
 ```sql
-[TRACING] SELECT
-    [LAST] [TOP k] resultColumn [, resultColumn] ...
+SELECT [LAST] resultColumn [, resultColumn] ...
+    [INTO intoItem [, intoItem] ...]
     FROM prefixPath [, prefixPath] ...
-    WHERE whereCondition
+    [WHERE whereCondition]
     [GROUP BY ([startTime, endTime), interval, slidingStep)]
     [GROUP BY LEVEL = levelNum [, levelNum] ...]
-    [FILL ({PREVIOUS, beforeRange | LINEAR, beforeRange, afterRange | constant})]
+    [FILL ({PREVIOUS | LINEAR | constant})]
+    [HAVING havingCondition]
+    [ORDER BY TIME {ASC | DESC}]
     [LIMIT rowLimit] [OFFSET rowOffset]
     [SLIMIT seriesLimit] [SOFFSET seriesOffset]
-    [WITHOUT NULL {ANY | ALL} [resultColumn [, resultColumn] ...]]
-    [ORDER BY TIME {ASC | DESC}]
-    [{ALIGN BY DEVICE | DISABLE ALIGN}]
+    [ALIGN BY DEVICE]
 ```
 
 The most commonly used clauses of `SELECT` statements are these:
 
 - Each `resultColumn` indicates a column that you want to retrieve, which may be a suffix of time series paths, an aggregate function and so on. There must be at least one `resultColumn`.  For more details for `resultColumn`, please refer to [Select Expression](./Select-Expression.md) .
 - `fromClause` contains the prefix of one or more time-series paths to query.
-- `whereCondition` (Optional) specify the filter criterion named ` queryfilter`. `queryfilter` is a logical expression that returns the data points which calculation result is TRUE. If you do not specify `whereCondition`, return all data points in the time series. For more details, please refer to [Query Filter](./Query-Filter.md).
+- `whereCondition` is a logical expression that returns the data points which calculation result is TRUE. If you do not specify `whereCondition`, return all data points in the time series. For more details, please refer to [Query Filter](./Query-Filter.md).
 - The query results are sorted in ascending order by timestamp. You can specify the results to be sorted in descending order by timestamp through `ORDER BY TIME DESC` clause.
 - When there is a large amount of query result data, you can use `LIMIT/SLIMIT` and `OFFSET/SOFFSET` to paginate the result set, see [Query Result Pagination](./Pagination.md) for details.
 - The query result set is aligned according to the timestamp by default, that is, the time series is used as the column, and the timestamp of each row of data is the same. For other result set alignments, see [Query Result Alignment](./Result-Format.md).
diff --git a/docs/zh/UserGuide/Query-Data/Overview.md b/docs/zh/UserGuide/Query-Data/Overview.md
index a2f1e65952..98f1bce56f 100644
--- a/docs/zh/UserGuide/Query-Data/Overview.md
+++ b/docs/zh/UserGuide/Query-Data/Overview.md
@@ -26,25 +26,25 @@
 在 IoTDB 中,使用 `SELECT` 语句从一条或多条时间序列中查询数据。 下面是 `SELECT` 语句的语法定义:
 
 ```sql
-[TRACING] SELECT
-    [LAST] [TOP k] resultColumn [, resultColumn] ...
+SELECT [LAST] resultColumn [, resultColumn] ...
+    [INTO intoItem [, intoItem] ...]
     FROM prefixPath [, prefixPath] ...
-    WHERE whereCondition
+    [WHERE whereCondition]
     [GROUP BY ([startTime, endTime), interval, slidingStep)]
     [GROUP BY LEVEL = levelNum [, levelNum] ...]
-    [FILL ({PREVIOUS, beforeRange | LINEAR, beforeRange, afterRange | constant})]
+    [FILL ({PREVIOUS | LINEAR | constant})]
+    [HAVING havingCondition]
+    [ORDER BY TIME {ASC | DESC}]
     [LIMIT rowLimit] [OFFSET rowOffset]
     [SLIMIT seriesLimit] [SOFFSET seriesOffset]
-    [WITHOUT NULL {ANY | ALL} [resultColumn [, resultColumn] ...]]
-    [ORDER BY TIME {ASC | DESC}]
-    [{ALIGN BY DEVICE | DISABLE ALIGN}]
+    [ALIGN BY DEVICE]
 ```
 
 常用的子句如下:
 
 - 每个 `resultColumn` 对应查询结果的一列,支持时间序列后缀、时间序列生成函数(包括用户自定义函数)、聚合函数、数字常量、算数运算表达式。每个 `SELECT` 语句至少应该包含一个 `resultColumn` 。关于 `resultColumn`,详见 [选择表达式](./Select-Expression.md) 。
 - `fromClause` 包含要查询的一个或多个时间序列的前缀。
-- `whereCondition`(可选)指定了查询的筛选条件 `queryFilter`。`queryFilter` 是一个逻辑表达式,查询结果返回计算结果为真的数据点。如果没有指定 `whereCondition`,则返回序列中所有数据点。关于 `queryFilter`,详见 [查询过滤条件](./Query-Filter.md) 。
+- `whereCondition` 指定了查询的筛选条件。`whereCondition` 是一个逻辑表达式,查询结果返回计算结果为真的数据点。如果没有指定 `whereCondition`,则返回序列中所有数据点。关于 `whereCondition`,详见 [查询过滤条件](./Query-Filter.md) 。
 - 查询结果默认按照时间戳大小升序排列,可以通过 `ORDER BY TIME DESC` 指定结果集按照时间戳大小降序排列。
 - 当查询结果数据量很大时,可以使用 `LIMIT/SLIMIT` 及 `OFFSET/SOFFSET` 对结果集进行分页,详见 [查询结果分页](./Pagination.md) 。
 - 查询结果集默认按照时间戳进行对齐,即以时间序列为列,每一行数据各列的时间戳相同。其他结果集对齐方式详见 [查询结果对齐格式](./Result-Format.md) 。