You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| COUNT | Counts the number of data points. | All types | INT64 |
162
+
| COUNT_IF | COUNT_IF(exp) counts the number of rows that satisfy a specified boolean expression. |`exp` must be a boolean expression,(e.g. `count_if(temperature>20)`) | INT64 |
162
163
| SUM | Calculates the sum. | INT32 INT64 FLOAT DOUBLE | DOUBLE |
| MAX | Finds the maximum value. | All types | Same as input type |
@@ -177,7 +178,7 @@ SELECT LEAST(temperature,humidity) FROM table2;
177
178
| MIN_BY | MIN_BY(x, y) finds the value of x corresponding to the minimum y in the binary input x and y. MIN_BY(time, x) returns the timestamp when x is at its minimum. | x and y can be of any type | Same as the data type of the first input x |
178
179
| FIRST_BY | FIRST_BY(x, y) finds the value of x in the same row when y is the first non-null value. | x and y can be of any type | Same as the data type of the first input x |
179
180
| LAST_BY | LAST_BY(x, y) finds the value of x in the same row when y is the last non-null value. | x and y can be of any type | Same as the data type of the first input x |
180
-
| COUNT_IF | COUNT_IF(exp) counts the number of rows that satisfy a specified boolean expression. |`exp` must be a boolean expression,(e.g. `count_if(temperature>20)`) | INT64 |
181
+
181
182
182
183
### 2.3 Examples
183
184
@@ -207,7 +208,29 @@ Total line number = 1
207
208
It costs 0.834s
208
209
```
209
210
210
-
#### 2.3.3 First
211
+
212
+
#### 2.3.3 Count_if
213
+
214
+
Count `Non-Null``arrival_time` Records in `table2`
215
+
216
+
```sql
217
+
select count_if(arrival_time is not null) from table2;
218
+
```
219
+
220
+
The execution result is as follows:
221
+
222
+
```sql
223
+
+-----+
224
+
|_col0|
225
+
+-----+
226
+
| 4|
227
+
+-----+
228
+
Total linenumber=1
229
+
It costs 0.047s
230
+
```
231
+
232
+
233
+
#### 2.3.4 First
211
234
212
235
Finds the values with the smallest timestamp that are not NULL in the `temperature` and `humidity` columns.
213
236
@@ -227,7 +250,7 @@ Total line number = 1
227
250
It costs 0.170s
228
251
```
229
252
230
-
#### 2.3.4 Last
253
+
#### 2.3.5 Last
231
254
232
255
Finds the values with the largest timestamp that are not NULL in the `temperature` and `humidity` columns.
233
256
@@ -247,7 +270,7 @@ Total line number = 1
247
270
It costs 0.211s
248
271
```
249
272
250
-
#### 2.3.5 First_by
273
+
#### 2.3.6 First_by
251
274
252
275
Finds the `time` value of the row with the smallest timestamp that is not NULL in the `temperature` column, and the `humidity` value of the row with the smallest timestamp that is not NULL in the `temperature` column.
253
276
@@ -267,7 +290,7 @@ Total line number = 1
267
290
It costs 0.269s
268
291
```
269
292
270
-
#### 2.3.6 Last_by
293
+
#### 2.3.7 Last_by
271
294
272
295
Queries the `time` value of the row with the largest timestamp that is not NULL in the `temperature` column, and the `humidity` value of the row with the largest timestamp that is not NULL in the `temperature` column.
273
296
@@ -287,7 +310,7 @@ Total line number = 1
287
310
It costs 0.070s
288
311
```
289
312
290
-
#### 2.3.7 Max_by
313
+
#### 2.3.8 Max_by
291
314
292
315
Queries the `time` value of the row where the `temperature` column is at its maximum, and the `humidity` value of the row where the `temperature` column is at its maximum.
293
316
@@ -307,7 +330,7 @@ Total line number = 1
307
330
It costs 0.172s
308
331
```
309
332
310
-
#### 2.3.8 Min_by
333
+
#### 2.3.9 Min_by
311
334
312
335
Queries the `time` value of the row where the `temperature` column is at its minimum, and the `humidity` value of the row where the `temperature` column is at its minimum.
313
336
@@ -328,27 +351,6 @@ It costs 0.244s
328
351
```
329
352
330
353
331
-
### 2.3.9 Count_if
332
-
333
-
Count `Non-Null``arrival_time` Records in `table2`
334
-
335
-
```sql
336
-
select count_if(arrival_time is not null) from table2;
| COUNT | Counts the number of data points. | All types | INT64 |
162
+
| COUNT_IF | COUNT_IF(exp) counts the number of rows that satisfy a specified boolean expression. |`exp` must be a boolean expression,(e.g. `count_if(temperature>20)`) | INT64 |
162
163
| SUM | Calculates the sum. | INT32 INT64 FLOAT DOUBLE | DOUBLE |
| MAX | Finds the maximum value. | All types | Same as input type |
@@ -177,7 +178,7 @@ SELECT LEAST(temperature,humidity) FROM table2;
177
178
| MIN_BY | MIN_BY(x, y) finds the value of x corresponding to the minimum y in the binary input x and y. MIN_BY(time, x) returns the timestamp when x is at its minimum. | x and y can be of any type | Same as the data type of the first input x |
178
179
| FIRST_BY | FIRST_BY(x, y) finds the value of x in the same row when y is the first non-null value. | x and y can be of any type | Same as the data type of the first input x |
179
180
| LAST_BY | LAST_BY(x, y) finds the value of x in the same row when y is the last non-null value. | x and y can be of any type | Same as the data type of the first input x |
180
-
| COUNT_IF | COUNT_IF(exp) counts the number of rows that satisfy a specified boolean expression. |`exp` must be a boolean expression,(e.g. `count_if(temperature>20)`) | INT64 |
181
+
181
182
182
183
### 2.3 Examples
183
184
@@ -207,7 +208,29 @@ Total line number = 1
207
208
It costs 0.834s
208
209
```
209
210
210
-
#### 2.3.3 First
211
+
212
+
#### 2.3.3 Count_if
213
+
214
+
Count `Non-Null``arrival_time` Records in `table2`
215
+
216
+
```sql
217
+
select count_if(arrival_time is not null) from table2;
218
+
```
219
+
220
+
The execution result is as follows:
221
+
222
+
```sql
223
+
+-----+
224
+
|_col0|
225
+
+-----+
226
+
| 4|
227
+
+-----+
228
+
Total linenumber=1
229
+
It costs 0.047s
230
+
```
231
+
232
+
233
+
#### 2.3.4 First
211
234
212
235
Finds the values with the smallest timestamp that are not NULL in the `temperature` and `humidity` columns.
213
236
@@ -227,7 +250,7 @@ Total line number = 1
227
250
It costs 0.170s
228
251
```
229
252
230
-
#### 2.3.4 Last
253
+
#### 2.3.5 Last
231
254
232
255
Finds the values with the largest timestamp that are not NULL in the `temperature` and `humidity` columns.
233
256
@@ -247,7 +270,7 @@ Total line number = 1
247
270
It costs 0.211s
248
271
```
249
272
250
-
#### 2.3.5 First_by
273
+
#### 2.3.6 First_by
251
274
252
275
Finds the `time` value of the row with the smallest timestamp that is not NULL in the `temperature` column, and the `humidity` value of the row with the smallest timestamp that is not NULL in the `temperature` column.
253
276
@@ -267,7 +290,7 @@ Total line number = 1
267
290
It costs 0.269s
268
291
```
269
292
270
-
#### 2.3.6 Last_by
293
+
#### 2.3.7 Last_by
271
294
272
295
Queries the `time` value of the row with the largest timestamp that is not NULL in the `temperature` column, and the `humidity` value of the row with the largest timestamp that is not NULL in the `temperature` column.
273
296
@@ -287,7 +310,7 @@ Total line number = 1
287
310
It costs 0.070s
288
311
```
289
312
290
-
#### 2.3.7 Max_by
313
+
#### 2.3.8 Max_by
291
314
292
315
Queries the `time` value of the row where the `temperature` column is at its maximum, and the `humidity` value of the row where the `temperature` column is at its maximum.
293
316
@@ -307,7 +330,7 @@ Total line number = 1
307
330
It costs 0.172s
308
331
```
309
332
310
-
#### 2.3.8 Min_by
333
+
#### 2.3.9 Min_by
311
334
312
335
Queries the `time` value of the row where the `temperature` column is at its minimum, and the `humidity` value of the row where the `temperature` column is at its minimum.
313
336
@@ -328,27 +351,6 @@ It costs 0.244s
328
351
```
329
352
330
353
331
-
### 2.3.9 Count_if
332
-
333
-
Count `Non-Null``arrival_time` Records in `table2`
334
-
335
-
```sql
336
-
select count_if(arrival_time is not null) from table2;
0 commit comments