Skip to content

Commit c8b46a5

Browse files
committed
adjust number
1 parent 576d7f3 commit c8b46a5

File tree

2 files changed

+20
-20
lines changed

2 files changed

+20
-20
lines changed

src/UserGuide/Master/Table/SQL-Manual/Featured-Functions_timecho.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -695,9 +695,9 @@ IoTDB> SELECT window_start, window_end, stock_id, avg(price) as avg FROM CUMULAT
695695
```
696696

697697

698-
## 2. Window Functions
698+
## 4. Window Functions
699699

700-
### 2.1 Function Overview
700+
### 4.1 Function Overview
701701

702702
The Window Functions supported by IoTDB are special functions that perform calculations on each row based on a specific set of rows related to the current row (called a "window"). It combines grouping operations (`PARTITION BY`), sorting (`ORDER BY`), and definable calculation ranges (window frame `FRAME`), enabling complex cross-row calculations without collapsing the original data rows. It is commonly used in data analysis scenarios such as ranking, cumulative sums, moving averages, etc.
703703

@@ -746,9 +746,9 @@ the expected results can be obtained:
746746
+-----------------------------+------+----+----+
747747
```
748748

749-
### 2.2 Function Definition
749+
### 4.2 Function Definition
750750

751-
#### 2.2.1 SQL Definition
751+
#### 4.2.1 SQL Definition
752752

753753
```SQL
754754
windowDefinition
@@ -783,7 +783,7 @@ frameBound
783783
;
784784
```
785785

786-
#### 2.2.2 Window Definition
786+
#### 4.2.2 Window Definition
787787

788788
##### Partition
789789

@@ -1016,7 +1016,7 @@ Query result:
10161016
+-----------------------------+------+----+-----+
10171017
```
10181018

1019-
### 2.3 Built-in Window Functions
1019+
### 4.3 Built-in Window Functions
10201020

10211021
<table style="text-align: left;">
10221022
<tbody>
@@ -1092,7 +1092,7 @@ Query result:
10921092
</tbody>
10931093
</table>
10941094

1095-
#### 2.3.1 Aggregate Function
1095+
#### 4.3.1 Aggregate Function
10961096

10971097
All built-in aggregate functions such as `sum()`, `avg()`, `min()`, `max()` can be used as Window Functions.
10981098

@@ -1114,7 +1114,7 @@ IoTDB> SELECT *, sum(flow) OVER (PARTITION BY device ORDER BY flow) as sum FROM
11141114
+-----------------------------+------+----+----+
11151115
```
11161116

1117-
#### 2.3.2 Value Function
1117+
#### 4.3.2 Value Function
11181118

11191119
1. `first_value`
11201120

@@ -1218,7 +1218,7 @@ IoTDB> SELECT *, lag(flow) OVER w as lag FROM device_flow WINDOW w AS(PARTITION
12181218
+-----------------------------+------+----+----+
12191219
```
12201220

1221-
#### 2.3.3 Rank Function
1221+
#### 4.3.3 Rank Function
12221222

12231223
1. rank
12241224

@@ -1344,7 +1344,7 @@ IoTDB> SELECT *, ntile(2) OVER w as ntile FROM device_flow WINDOW w AS (PARTITIO
13441344
+-----------------------------+------+----+-----+
13451345
```
13461346

1347-
### 2.4 Scenario Examples
1347+
### 4.4 Scenario Examples
13481348

13491349
1. Multi-device diff function
13501350

src/UserGuide/latest-Table/SQL-Manual/Featured-Functions_timecho.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -695,9 +695,9 @@ IoTDB> SELECT window_start, window_end, stock_id, avg(price) as avg FROM CUMULAT
695695
```
696696

697697

698-
## 2. Window Functions
698+
## 4. Window Functions
699699

700-
### 2.1 Function Overview
700+
### 4.1 Function Overview
701701

702702
The Window Functions supported by IoTDB are special functions that perform calculations on each row based on a specific set of rows related to the current row (called a "window"). It combines grouping operations (`PARTITION BY`), sorting (`ORDER BY`), and definable calculation ranges (window frame `FRAME`), enabling complex cross-row calculations without collapsing the original data rows. It is commonly used in data analysis scenarios such as ranking, cumulative sums, moving averages, etc.
703703

@@ -746,9 +746,9 @@ the expected results can be obtained:
746746
+-----------------------------+------+----+----+
747747
```
748748

749-
### 2.2 Function Definition
749+
### 4.2 Function Definition
750750

751-
#### 2.2.1 SQL Definition
751+
#### 4.2.1 SQL Definition
752752

753753
```SQL
754754
windowDefinition
@@ -783,7 +783,7 @@ frameBound
783783
;
784784
```
785785

786-
#### 2.2.2 Window Definition
786+
#### 4.2.2 Window Definition
787787

788788
##### Partition
789789

@@ -1016,7 +1016,7 @@ Query result:
10161016
+-----------------------------+------+----+-----+
10171017
```
10181018

1019-
### 2.3 Built-in Window Functions
1019+
### 4.3 Built-in Window Functions
10201020

10211021
<table style="text-align: left;">
10221022
<tbody>
@@ -1092,7 +1092,7 @@ Query result:
10921092
</tbody>
10931093
</table>
10941094

1095-
#### 2.3.1 Aggregate Function
1095+
#### 4.3.1 Aggregate Function
10961096

10971097
All built-in aggregate functions such as `sum()`, `avg()`, `min()`, `max()` can be used as Window Functions.
10981098

@@ -1114,7 +1114,7 @@ IoTDB> SELECT *, sum(flow) OVER (PARTITION BY device ORDER BY flow) as sum FROM
11141114
+-----------------------------+------+----+----+
11151115
```
11161116

1117-
#### 2.3.2 Value Function
1117+
#### 4.3.2 Value Function
11181118

11191119
1. `first_value`
11201120

@@ -1218,7 +1218,7 @@ IoTDB> SELECT *, lag(flow) OVER w as lag FROM device_flow WINDOW w AS(PARTITION
12181218
+-----------------------------+------+----+----+
12191219
```
12201220

1221-
#### 2.3.3 Rank Function
1221+
#### 4.3.3 Rank Function
12221222

12231223
1. rank
12241224

@@ -1344,7 +1344,7 @@ IoTDB> SELECT *, ntile(2) OVER w as ntile FROM device_flow WINDOW w AS (PARTITIO
13441344
+-----------------------------+------+----+-----+
13451345
```
13461346

1347-
### 2.4 Scenario Examples
1347+
### 4.4 Scenario Examples
13481348

13491349
1. Multi-device diff function
13501350

0 commit comments

Comments
 (0)