Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions src/UserGuide/Master/Table/Basic-Concept/Query-Data.md
Original file line number Diff line number Diff line change
Expand Up @@ -327,26 +327,26 @@ IoTDB> SELECT date_bin_gapfill(1s, TIME) AS b_time,
**Example: Aligning multiple sequences by integer time:**

```SQL
IoTDB> SELECT A.a_time AS TIME,
IoTDB> SELECT time,
a_value,
b_value
FROM
(SELECT date_bin_gapfill(1s, TIME) AS a_time,
(SELECT date_bin_gapfill(1s, TIME) AS time,
first(temperature) AS a_value
FROM table1
WHERE device_id = 'd1'
AND TIME >= 2025-05-13 00:00:00.000
AND TIME <= 2025-05-13 00:00:07.000
GROUP BY 1 FILL METHOD PREVIOUS) A
JOIN
(SELECT date_bin_gapfill(1s, TIME) AS b_time,
(SELECT date_bin_gapfill(1s, TIME) AS time,
first(humidity) AS b_value
FROM table2
WHERE device_id = 'd1'
AND TIME >= 2025-05-13 00:00:00.000
AND TIME <= 2025-05-13 00:00:07.000
GROUP BY 1 FILL METHOD PREVIOUS) B
ON A.a_time=B.b_time
USING (time)
```

**Result:**
Expand All @@ -369,26 +369,26 @@ IoTDB> SELECT A.a_time AS TIME,
**Example:**

```SQL
IoTDB> SELECT A.a_time AS TIME,
IoTDB> SELECT time,
a_value,
b_value
FROM
(SELECT date_bin_gapfill(1s, TIME) AS a_time,
(SELECT date_bin_gapfill(1s, TIME) AS time,
first(temperature) AS a_value
FROM table1
WHERE device_id = 'd1'
AND TIME >= 2025-05-13 00:00:00.000
AND TIME <= 2025-05-13 00:00:07.000
GROUP BY 1) A
JOIN
(SELECT date_bin_gapfill(1s, TIME) AS b_time,
(SELECT date_bin_gapfill(1s, TIME) AS time,
first(humidity) AS b_value
FROM table2
WHERE device_id = 'd1'
AND TIME >= 2025-05-13 00:00:00.000
AND TIME <= 2025-05-13 00:00:07.000
GROUP BY 1) B
ON A.a_time=B.b_time
USING (time)
```

**Result:**
Expand Down Expand Up @@ -487,26 +487,26 @@ IoTDB> SELECT date_bin_gapfill(1s, TIME) AS c_time,
**Example: Aligning multiple sequences by the higher sampling frequency:**

```SQL
IoTDB> SELECT A.a_time AS TIME,
IoTDB> SELECT time,
a_value,
c_value
FROM
(SELECT date_bin_gapfill(1s, TIME) AS a_time,
(SELECT date_bin_gapfill(1s, TIME) AS time,
first(temperature) AS a_value
FROM table1
WHERE device_id = 'd1'
AND TIME >= 2025-05-13 00:00:00.000
AND TIME <= 2025-05-13 00:00:07.000
GROUP BY 1 FILL METHOD PREVIOUS) A
JOIN
(SELECT date_bin_gapfill(1s, TIME) AS c_time,
(SELECT date_bin_gapfill(1s, TIME) AS time,
first(humidity) AS c_value
FROM table3
WHERE device_id = 'd1'
AND TIME >= 2025-05-13 00:00:00.000
AND TIME <= 2025-05-13 00:00:07.000
GROUP BY 1 FILL METHOD PREVIOUS) C
ON A.a_time=C.c_time
USING (time)
```

**Result:**
Expand Down
25 changes: 13 additions & 12 deletions src/UserGuide/latest-Table/Basic-Concept/Query-Data.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ IoTDB> SELECT time, temperature, humidity
Total line number = 7
It costs 0.106s
```

**Example 3:Multi device time aligned query**

```SQL
Expand Down Expand Up @@ -326,26 +327,26 @@ IoTDB> SELECT date_bin_gapfill(1s, TIME) AS b_time,
**Example: Aligning multiple sequences by integer time:**

```SQL
IoTDB> SELECT A.a_time AS TIME,
IoTDB> SELECT time,
a_value,
b_value
FROM
(SELECT date_bin_gapfill(1s, TIME) AS a_time,
(SELECT date_bin_gapfill(1s, TIME) AS time,
first(temperature) AS a_value
FROM table1
WHERE device_id = 'd1'
AND TIME >= 2025-05-13 00:00:00.000
AND TIME <= 2025-05-13 00:00:07.000
GROUP BY 1 FILL METHOD PREVIOUS) A
JOIN
(SELECT date_bin_gapfill(1s, TIME) AS b_time,
(SELECT date_bin_gapfill(1s, TIME) AS time,
first(humidity) AS b_value
FROM table2
WHERE device_id = 'd1'
AND TIME >= 2025-05-13 00:00:00.000
AND TIME <= 2025-05-13 00:00:07.000
GROUP BY 1 FILL METHOD PREVIOUS) B
ON A.a_time=B.b_time
USING (time)
```

**Result:**
Expand All @@ -368,26 +369,26 @@ IoTDB> SELECT A.a_time AS TIME,
**Example:**

```SQL
IoTDB> SELECT A.a_time AS TIME,
IoTDB> SELECT time,
a_value,
b_value
FROM
(SELECT date_bin_gapfill(1s, TIME) AS a_time,
(SELECT date_bin_gapfill(1s, TIME) AS time,
first(temperature) AS a_value
FROM table1
WHERE device_id = 'd1'
AND TIME >= 2025-05-13 00:00:00.000
AND TIME <= 2025-05-13 00:00:07.000
GROUP BY 1) A
JOIN
(SELECT date_bin_gapfill(1s, TIME) AS b_time,
(SELECT date_bin_gapfill(1s, TIME) AS time,
first(humidity) AS b_value
FROM table2
WHERE device_id = 'd1'
AND TIME >= 2025-05-13 00:00:00.000
AND TIME <= 2025-05-13 00:00:07.000
GROUP BY 1) B
ON A.a_time=B.b_time
USING (time)
```

**Result:**
Expand Down Expand Up @@ -486,26 +487,26 @@ IoTDB> SELECT date_bin_gapfill(1s, TIME) AS c_time,
**Example: Aligning multiple sequences by the higher sampling frequency:**

```SQL
IoTDB> SELECT A.a_time AS TIME,
IoTDB> SELECT time,
a_value,
c_value
FROM
(SELECT date_bin_gapfill(1s, TIME) AS a_time,
(SELECT date_bin_gapfill(1s, TIME) AS time,
first(temperature) AS a_value
FROM table1
WHERE device_id = 'd1'
AND TIME >= 2025-05-13 00:00:00.000
AND TIME <= 2025-05-13 00:00:07.000
GROUP BY 1 FILL METHOD PREVIOUS) A
JOIN
(SELECT date_bin_gapfill(1s, TIME) AS c_time,
(SELECT date_bin_gapfill(1s, TIME) AS time,
first(humidity) AS c_value
FROM table3
WHERE device_id = 'd1'
AND TIME >= 2025-05-13 00:00:00.000
AND TIME <= 2025-05-13 00:00:07.000
GROUP BY 1 FILL METHOD PREVIOUS) C
ON A.a_time=C.c_time
USING (time)
```

**Result:**
Expand Down
24 changes: 12 additions & 12 deletions src/zh/UserGuide/Master/Table/Basic-Concept/Query-Data.md
Original file line number Diff line number Diff line change
Expand Up @@ -329,26 +329,26 @@ IoTDB> SELECT date_bin_gapfill(1s, TIME) AS b_time,
**示例:按整点将多个序列进行时间对齐:**

```SQL
IoTDB> SELECT A.a_time AS TIME,
IoTDB> SELECT time,
a_value,
b_value
FROM
(SELECT date_bin_gapfill(1s, TIME) AS a_time,
(SELECT date_bin_gapfill(1s, TIME) AS time,
first(temperature) AS a_value
FROM table1
WHERE device_id = 'd1'
AND TIME >= 2025-05-13 00:00:00.000
AND TIME <= 2025-05-13 00:00:07.000
GROUP BY 1 FILL METHOD PREVIOUS) A
JOIN
(SELECT date_bin_gapfill(1s, TIME) AS b_time,
(SELECT date_bin_gapfill(1s, TIME) AS time,
first(humidity) AS b_value
FROM table2
WHERE device_id = 'd1'
AND TIME >= 2025-05-13 00:00:00.000
AND TIME <= 2025-05-13 00:00:07.000
GROUP BY 1 FILL METHOD PREVIOUS) B
ON A.a_time=B.b_time
USING (time)
```

**结果:**
Expand All @@ -371,26 +371,26 @@ IoTDB> SELECT A.a_time AS TIME,
**示例:**

```SQL
IoTDB> SELECT A.a_time AS TIME,
IoTDB> SELECT time,
a_value,
b_value
FROM
(SELECT date_bin_gapfill(1s, TIME) AS a_time,
(SELECT date_bin_gapfill(1s, TIME) AS time,
first(temperature) AS a_value
FROM table1
WHERE device_id = 'd1'
AND TIME >= 2025-05-13 00:00:00.000
AND TIME <= 2025-05-13 00:00:07.000
GROUP BY 1) A
JOIN
(SELECT date_bin_gapfill(1s, TIME) AS b_time,
(SELECT date_bin_gapfill(1s, TIME) AS time,
first(humidity) AS b_value
FROM table2
WHERE device_id = 'd1'
AND TIME >= 2025-05-13 00:00:00.000
AND TIME <= 2025-05-13 00:00:07.000
GROUP BY 1) B
ON A.a_time=B.b_time
USING (time)
```

**结果:**
Expand Down Expand Up @@ -489,26 +489,26 @@ IoTDB> SELECT date_bin_gapfill(1s, TIME) AS c_time,
**示例:按照高采样频率进行对齐:**

```SQL
IoTDB> SELECT A.a_time AS TIME,
IoTDB> SELECT time,
a_value,
c_value
FROM
(SELECT date_bin_gapfill(1s, TIME) AS a_time,
(SELECT date_bin_gapfill(1s, TIME) AS time,
first(temperature) AS a_value
FROM table1
WHERE device_id = 'd1'
AND TIME >= 2025-05-13 00:00:00.000
AND TIME <= 2025-05-13 00:00:07.000
GROUP BY 1 FILL METHOD PREVIOUS) A
JOIN
(SELECT date_bin_gapfill(1s, TIME) AS c_time,
(SELECT date_bin_gapfill(1s, TIME) AS time,
first(humidity) AS c_value
FROM table3
WHERE device_id = 'd1'
AND TIME >= 2025-05-13 00:00:00.000
AND TIME <= 2025-05-13 00:00:07.000
GROUP BY 1 FILL METHOD PREVIOUS) C
ON A.a_time=C.c_time
USING (time)
```

**结果:**
Expand Down
24 changes: 12 additions & 12 deletions src/zh/UserGuide/latest-Table/Basic-Concept/Query-Data.md
Original file line number Diff line number Diff line change
Expand Up @@ -329,26 +329,26 @@ IoTDB> SELECT date_bin_gapfill(1s, TIME) AS b_time,
**示例:按整点将多个序列进行时间对齐:**

```SQL
IoTDB> SELECT A.a_time AS TIME,
IoTDB> SELECT time,
a_value,
b_value
FROM
(SELECT date_bin_gapfill(1s, TIME) AS a_time,
(SELECT date_bin_gapfill(1s, TIME) AS time,
first(temperature) AS a_value
FROM table1
WHERE device_id = 'd1'
AND TIME >= 2025-05-13 00:00:00.000
AND TIME <= 2025-05-13 00:00:07.000
GROUP BY 1 FILL METHOD PREVIOUS) A
JOIN
(SELECT date_bin_gapfill(1s, TIME) AS b_time,
(SELECT date_bin_gapfill(1s, TIME) AS time,
first(humidity) AS b_value
FROM table2
WHERE device_id = 'd1'
AND TIME >= 2025-05-13 00:00:00.000
AND TIME <= 2025-05-13 00:00:07.000
GROUP BY 1 FILL METHOD PREVIOUS) B
ON A.a_time=B.b_time
USING (time)
```

**结果:**
Expand All @@ -371,26 +371,26 @@ IoTDB> SELECT A.a_time AS TIME,
**示例:**

```SQL
IoTDB> SELECT A.a_time AS TIME,
IoTDB> SELECT time,
a_value,
b_value
FROM
(SELECT date_bin_gapfill(1s, TIME) AS a_time,
(SELECT date_bin_gapfill(1s, TIME) AS time,
first(temperature) AS a_value
FROM table1
WHERE device_id = 'd1'
AND TIME >= 2025-05-13 00:00:00.000
AND TIME <= 2025-05-13 00:00:07.000
GROUP BY 1) A
JOIN
(SELECT date_bin_gapfill(1s, TIME) AS b_time,
(SELECT date_bin_gapfill(1s, TIME) AS time,
first(humidity) AS b_value
FROM table2
WHERE device_id = 'd1'
AND TIME >= 2025-05-13 00:00:00.000
AND TIME <= 2025-05-13 00:00:07.000
GROUP BY 1) B
ON A.a_time=B.b_time
USING (time)
```

**结果:**
Expand Down Expand Up @@ -489,26 +489,26 @@ IoTDB> SELECT date_bin_gapfill(1s, TIME) AS c_time,
**示例:按照高采样频率进行对齐:**

```SQL
IoTDB> SELECT A.a_time AS TIME,
IoTDB> SELECT time,
a_value,
c_value
FROM
(SELECT date_bin_gapfill(1s, TIME) AS a_time,
(SELECT date_bin_gapfill(1s, TIME) AS time,
first(temperature) AS a_value
FROM table1
WHERE device_id = 'd1'
AND TIME >= 2025-05-13 00:00:00.000
AND TIME <= 2025-05-13 00:00:07.000
GROUP BY 1 FILL METHOD PREVIOUS) A
JOIN
(SELECT date_bin_gapfill(1s, TIME) AS c_time,
(SELECT date_bin_gapfill(1s, TIME) AS time,
first(humidity) AS c_value
FROM table3
WHERE device_id = 'd1'
AND TIME >= 2025-05-13 00:00:00.000
AND TIME <= 2025-05-13 00:00:07.000
GROUP BY 1 FILL METHOD PREVIOUS) C
ON A.a_time=C.c_time
USING (time)
```

**结果:**
Expand Down