From ffa2ec3876bbbe891ef30f36666a83759cd917db Mon Sep 17 00:00:00 2001 From: liuyao <54liuyao@163.com> Date: Mon, 6 May 2024 10:16:26 +0800 Subject: [PATCH 1/2] Update 12-distinguished.md --- docs/en/12-taos-sql/12-distinguished.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/en/12-taos-sql/12-distinguished.md b/docs/en/12-taos-sql/12-distinguished.md index 90237a54f5..0cc40506d0 100644 --- a/docs/en/12-taos-sql/12-distinguished.md +++ b/docs/en/12-taos-sql/12-distinguished.md @@ -31,7 +31,7 @@ A PARTITION BY clause is processed as follows: select _wstart, location, max(current) from meters partition by location interval(10m) ``` -The most common usage of PARTITION BY is partitioning the data in subtables by tags then perform computation when querying data in a supertable. More specifically, `PARTITION BY TBNAME` partitions the data of each subtable into a single timeline, and this method facilitates the statistical analysis in many use cases of processing timeseries data. For example, calculate the average voltage of each meter every 10 minutes£º +The most common usage of PARTITION BY is partitioning the data in subtables by tags then perform computation when querying data in a supertable. More specifically, `PARTITION BY TBNAME` partitions the data of each subtable into a single timeline, and this method facilitates the statistical analysis in many use cases of processing timeseries data. For example, calculate the average voltage of each meter every 10 minutes£º ```sql select _wstart, tbname, avg(voltage) from meters partition by tbname interval(10m) ``` @@ -49,7 +49,7 @@ window_clause: { } ``` -Both interval_val and sliding_value are time durations which have 3 forms of representation. +Both interval_val and sliding_value are time durations, and interval_offset is the window offset, interval_offset must be less than interval_val, There are 3 forms of representation. - INTERVAL(1s, 500a) SLIDING(1s), the unit char should be any one of a (millisecond), b (nanosecond), d (day), h (hour), m (minute), n (month), s (second), u (microsecond), w (week), y (year). - INTERVAL(1000, 500) SLIDING(1000), the unit will the same as the queried database, if there are more than one databases, higher precision will be used. - INTERVAL('1s', '500a') SLIDING('1s'), unit must be specified, no spaces allowed. From c61e6f7e45bce40febb605dec9ea37c82cb1c7f6 Mon Sep 17 00:00:00 2001 From: liuyao <54liuyao@163.com> Date: Mon, 6 May 2024 10:17:25 +0800 Subject: [PATCH 2/2] Update 12-distinguished.md --- docs/en/12-taos-sql/12-distinguished.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/12-taos-sql/12-distinguished.md b/docs/en/12-taos-sql/12-distinguished.md index 0cc40506d0..4639a13bcc 100644 --- a/docs/en/12-taos-sql/12-distinguished.md +++ b/docs/en/12-taos-sql/12-distinguished.md @@ -44,7 +44,7 @@ Aggregation by time window is supported in TDengine. For example, in the case wh window_clause: { SESSION(ts_col, tol_val) | STATE_WINDOW(col) - | INTERVAL(interval_val [, offset]) [SLIDING (sliding_value)] [FILL({NONE | VALUE | PREV | NULL | LINEAR | NEXT})] + | INTERVAL(interval_val [, interval_offset]) [SLIDING (sliding_value)] [FILL({NONE | VALUE | PREV | NULL | LINEAR | NEXT})] | EVENT_WINDOW START WITH start_trigger_condition END WITH end_trigger_condition } ```