qiaojialin commented on a change in pull request #2029:
URL: https://github.com/apache/iotdb/pull/2029#discussion_r539880500



##########
File path: docs/zh/UserGuide/Operation Manual/DML Data Manipulation Language.md
##########
@@ -486,6 +486,98 @@ Total line number = 7
 It costs 0.018s
 ```
 
+#### 按照自然月份的降频聚合查询
+
+对应的SQL语句是:
+
+```
+select count(status) from root.ln.wf01.wt01 where time > 2017-11-01T01:00:00 
group by([2017-11-01T00:00:00, 2019-11-07T23:00:00), 1mo, 2mo);
+```
+
+这条查询的含义是:
+
+由于用户指定了滑动步长为`2mo`,GROUP BY语句执行时将会每次把时间间隔往后移动2个自然月的步长,而不是默认的1个自然月。
+
+也就意味着,我们想要取从2017-11-01到2019-11-07每2个自然月的第一个月的数据。
+
+上面这个例子的第一个参数是显示窗口参数,决定了最终的显示范围是[2017-11-01T00:00:00, 2019-11-07T23:00:00)。
+
+起始时间为2017-11-01T00:00:00,滑动步长将会以起始时间作为标准按月递增,取当月的1号作为时间间隔的起始时间。
+
+上面这个例子的第二个参数是划分时间轴的时间间隔参数,将`1mo`当作划分间隔,显示窗口参数的起始时间当作分割原点,时间轴即被划分为连续的时间间隔:[2017-11-01T00:00:00,
 2019-12-01T00:00:00), [2018-02-01T00:00:00, 2018-03-01T00:00:00), 
[2018-05-03T00:00:00, 2018-06-01T00:00:00)等等。

Review comment:
       ```suggestion
   
上面这个例子的第二个参数是划分时间轴的时间间隔参数,将`1mo`当作划分间隔,显示窗口参数的起始时间当作分割原点,时间轴即被划分为连续的时间间隔:[2017-11-01T00:00:00,
 2017-12-01T00:00:00), [2018-02-01T00:00:00, 2018-03-01T00:00:00), 
[2018-05-03T00:00:00, 2018-06-01T00:00:00)等等。
   ```




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to