This is an automated email from the ASF dual-hosted git repository. xiangweiwei pushed a commit to branch docInconsistnet in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit 326044fca5bdf50b6e9fd08301424c2ccc710c70 Author: Alima777 <[email protected]> AuthorDate: Mon Jan 10 11:33:02 2022 +0800 Fix doc inconsistent --- .../DML-Data-Manipulation-Language.md | 61 +++++++++++---------- .../DML-Data-Manipulation-Language.md | 62 +++++++++++----------- 2 files changed, 61 insertions(+), 62 deletions(-) diff --git a/docs/UserGuide/IoTDB-SQL-Language/DML-Data-Manipulation-Language.md b/docs/UserGuide/IoTDB-SQL-Language/DML-Data-Manipulation-Language.md index 811e745..c112808 100644 --- a/docs/UserGuide/IoTDB-SQL-Language/DML-Data-Manipulation-Language.md +++ b/docs/UserGuide/IoTDB-SQL-Language/DML-Data-Manipulation-Language.md @@ -1536,32 +1536,31 @@ Fuzzy query is divided into Like statement and Regexp statement, both of which c Like statement: -Example 1: Query data containing `'cc'` in `value` under `root.sg.device`. +Example 1: Query data containing `'cc'` in `value` under `root.sg.d1`. The percentage (`%`) wildcard matches any string of zero or more characters. - ``` -IoTDB> select * from root.sg.device where value like '%cc%' -+-----------------------------+--------------------+ -| Time|root.sg.device.value| -+-----------------------------+--------------------+ -|2017-11-07T23:59:00.000+08:00| aabbccdd| -|2017-11-07T23:59:00.000+08:00| cc| -+-----------------------------+--------------------+ +IoTDB> select * from root.sg.d1 where value like '%cc%' ++-----------------------------+----------------+ +| Time|root.sg.d1.value| ++-----------------------------+----------------+ +|2017-11-01T00:00:00.000+08:00| aabbccdd| +|2017-11-01T00:00:01.000+08:00| cc| ++-----------------------------+----------------+ Total line number = 2 It costs 0.002s ``` -Example 2: Query data that consists of 3 characters and the second character is `'b'` in `value` under `root.sg.device`. +Example 2: Query data that consists of 3 characters and the second character is `'b'` in `value` under `root.sg.d1`. The underscore (`_`) wildcard matches any single character. ``` IoTDB> select * from root.sg.device where value like '_b_' -+-----------------------------+--------------------+ -| Time|root.sg.device.value| -+-----------------------------+--------------------+ -|2017-11-07T23:59:00.000+08:00| abc| -+-----------------------------+--------------------+ ++-----------------------------+----------------+ +| Time|root.sg.d1.value| ++-----------------------------+----------------+ +|2017-11-01T00:00:02.000+08:00| abc| ++-----------------------------+----------------+ Total line number = 1 It costs 0.002s ``` @@ -1570,30 +1569,30 @@ Regexp statement: The filter conditions that need to be passed in are regular expressions in the Java standard library style -Example 1: Query a string composed of 26 English characters for the value under root.sg.device +Example 1: Query a string composed of 26 English characters for the value under root.sg.d1 ``` -IoTDB> select * from root.sg.device where value regexp '^[A-Za-z]+$' -+-----------------------------+--------------------+ -| Time|root.sg.device.value| -+-----------------------------+--------------------+ -|2017-11-07T23:59:00.000+08:00| aabbccdd| -|2017-11-07T23:59:00.000+08:00| cc| -+-----------------------------+--------------------+ +IoTDB> select * from root.sg.d1 where value regexp '^[A-Za-z]+$' ++-----------------------------+----------------+ +| Time|root.sg.d1.value| ++-----------------------------+----------------+ +|2017-11-01T00:00:00.000+08:00| aabbccdd| +|2017-11-01T00:00:01.000+08:00| cc| ++-----------------------------+----------------+ Total line number = 2 It costs 0.002s ``` -Example 2: Query root.sg.device where the value value is a string composed of 26 lowercase English characters and the time is greater than 100 +Example 2: Query root.sg.d1 where the value value is a string composed of 26 lowercase English characters and the time is greater than 100 ``` -IoTDB> select * from root.sg.device where value regexp '^[a-z]+$' and time > 100 -+-----------------------------+--------------------+ -| Time|root.sg.device.value| -+-----------------------------+--------------------+ -|2017-11-07T23:59:00.000+08:00| aabbccdd| -|2017-11-07T23:59:00.000+08:00| cc| -+-----------------------------+--------------------+ +IoTDB> select * from root.sg.d1 where value regexp '^[a-z]+$' and time > 100 ++-----------------------------+----------------+ +| Time|root.sg.d1.value| ++-----------------------------+----------------+ +|2017-11-01T00:00:00.000+08:00| aabbccdd| +|2017-11-01T00:00:01.000+08:00| cc| ++-----------------------------+----------------+ Total line number = 2 It costs 0.002s ``` diff --git a/docs/zh/UserGuide/IoTDB-SQL-Language/DML-Data-Manipulation-Language.md b/docs/zh/UserGuide/IoTDB-SQL-Language/DML-Data-Manipulation-Language.md index 06ce032..4199927 100644 --- a/docs/zh/UserGuide/IoTDB-SQL-Language/DML-Data-Manipulation-Language.md +++ b/docs/zh/UserGuide/IoTDB-SQL-Language/DML-Data-Manipulation-Language.md @@ -1381,7 +1381,7 @@ It costs 0.006s 加上滑动 Step 的降采样后的结果也可以汇总 ```sql -select count(status) from root.ln.wf01.wt01 group by ([0,20),2ms,3ms), level=1; +select count(status) from root.ln.wf01.wt01 group by ([2017-11-01 00:00:00, 2017-11-07 23:00:00), 3h, 1d), level=1; ``` ``` @@ -1551,31 +1551,31 @@ It costs 0.002s Like语句: -示例 1:查询 `root.sg.device` 下 `value` 含有`'cc'`的数据。 +示例 1:查询 `root.sg.d1` 下 `value` 含有`'cc'`的数据。 `%` 表示任意0个或多个字符。 ``` -IoTDB> select * from root.sg.device where value like '%cc%' -+-----------------------------+--------------------+ -| Time|root.sg.device.value| -+-----------------------------+--------------------+ -|2017-11-07T23:59:00.000+08:00| aabbccdd| -|2017-11-07T23:59:00.000+08:00| cc| -+-----------------------------+--------------------+ +IoTDB> select * from root.sg.d1 where value like '%cc%' ++-----------------------------+----------------+ +| Time|root.sg.d1.value| ++-----------------------------+----------------+ +|2017-11-01T00:00:00.000+08:00| aabbccdd| +|2017-11-01T00:00:01.000+08:00| cc| ++-----------------------------+----------------+ Total line number = 2 It costs 0.002s ``` -示例 2:查询 `root.sg.device` 下 `value` 中间为 `'b'`、前后为任意单个字符的数据。 +示例 2:查询 `root.sg.d1` 下 `value` 中间为 `'b'`、前后为任意单个字符的数据。 `_` 表示任意单个字符。 ``` IoTDB> select * from root.sg.device where value like '_b_' -+-----------------------------+--------------------+ -| Time|root.sg.device.value| -+-----------------------------+--------------------+ -|2017-11-07T23:59:00.000+08:00| abc| -+-----------------------------+--------------------+ ++-----------------------------+----------------+ +| Time|root.sg.d1.value| ++-----------------------------+----------------+ +|2017-11-01T00:00:02.000+08:00| abc| ++-----------------------------+----------------+ Total line number = 1 It costs 0.002s ``` @@ -1584,30 +1584,30 @@ Regexp语句: 需要传入的过滤条件为 Java 标准库风格的正则表达式 -示例 1:查询 root.sg.device 下 value 值为26个英文字符组成的字符串 +示例 1:查询 root.sg.d1 下 value 值为26个英文字符组成的字符串 ``` -IoTDB> select * from root.sg.device where value regexp '^[A-Za-z]+$' -+-----------------------------+--------------------+ -| Time|root.sg.device.value| -+-----------------------------+--------------------+ -|2017-11-07T23:59:00.000+08:00| aabbccdd| -|2017-11-07T23:59:00.000+08:00| cc| -+-----------------------------+--------------------+ +IoTDB> select * from root.sg.d1 where value regexp '^[A-Za-z]+$' ++-----------------------------+----------------+ +| Time|root.sg.d1.value| ++-----------------------------+----------------+ +|2017-11-01T00:00:00.000+08:00| aabbccdd| +|2017-11-01T00:00:01.000+08:00| cc| ++-----------------------------+----------------+ Total line number = 2 It costs 0.002s ``` -示例 2:查询 root.sg.device 下 value 值为26个小写英文字符组成的字符串 且时间大于100的 +示例 2:查询 root.sg.d1 下 value 值为26个小写英文字符组成的字符串 且时间大于100的 ``` -IoTDB> select * from root.sg.device where value regexp '^[a-z]+$' and time > 100 -+-----------------------------+--------------------+ -| Time|root.sg.device.value| -+-----------------------------+--------------------+ -|2017-11-07T23:59:00.000+08:00| aabbccdd| -|2017-11-07T23:59:00.000+08:00| cc| -+-----------------------------+--------------------+ +IoTDB> select * from root.sg.d1 where value regexp '^[a-z]+$' and time > 100 ++-----------------------------+----------------+ +| Time|root.sg.d1.value| ++-----------------------------+----------------+ +|2017-11-01T00:00:00.000+08:00| aabbccdd| +|2017-11-01T00:00:01.000+08:00| cc| ++-----------------------------+----------------+ Total line number = 2 It costs 0.002s ```
