docs: grammar: sql functions
Minor grammar and formatting updates to SQL > Functions page
This commit is contained in:
parent
f7811dd3cf
commit
cc820359c4
|
@ -4,7 +4,7 @@ title: Functions
|
|||
|
||||
## Aggregate Functions
|
||||
|
||||
Aggregate query is supported in TDengine by following aggregate functions and selection functions.
|
||||
Aggregate queries are supported in TDengine by the following aggregate functions and selection functions.
|
||||
|
||||
### COUNT
|
||||
|
||||
|
@ -261,7 +261,7 @@ Query OK, 1 row(s) in set (0.008388s)
|
|||
|
||||
## Selection Functions
|
||||
|
||||
When any selective function is used, timestamp column or tag columns including `tbname` can be specified to show that the selected value are from which rows.
|
||||
When any select function is used, timestamp column or tag columns including `tbname` can be specified to show that the selected value are from which rows.
|
||||
|
||||
### MIN
|
||||
|
||||
|
@ -584,7 +584,7 @@ SELECT INTERP(field_name) FROM { tb_name | stb_name } [WHERE where_condition] [
|
|||
|
||||
**Description**: The value that matches the specified timestamp range is returned, if existing; or an interpolation value is returned.
|
||||
|
||||
**Return value type**: same as the column being operated
|
||||
**Return value type**: Same as the column being operated
|
||||
|
||||
**Applicable column types**: Numeric data types
|
||||
|
||||
|
@ -608,7 +608,7 @@ SELECT INTERP(field_name) FROM { tb_name | stb_name } [WHERE where_condition] [
|
|||
taos> SELECT INTERP(current) FROM t1 RANGE('2017-7-14 18:40:00','2017-7-14 18:40:00') FILL(LINEAR);
|
||||
```
|
||||
|
||||
- Get an original data every 5 seconds, no interpolation, between "2017-07-14 18:00:00" and "2017-07-14 19:00:00:
|
||||
- Get original data every 5 seconds, no interpolation, between "2017-07-14 18:00:00" and "2017-07-14 19:00:00:
|
||||
|
||||
```
|
||||
taos> SELECT INTERP(current) FROM t1 RANGE('2017-7-14 18:00:00','2017-7-14 19:00:00') EVERY(5s);
|
||||
|
@ -662,7 +662,7 @@ SELECT INTERP(field_name) FROM { tb_name | stb_name } WHERE ts='timestamp' [FILL
|
|||
Query OK, 1 row(s) in set (0.002652s)
|
||||
```
|
||||
|
||||
If there is not any data corresponding to the specified timestamp, an interpolation value is returned if interpolation policy is specified by `FILL` parameter; or nothing is returned\
|
||||
If there is no data corresponding to the specified timestamp, an interpolation value is returned if interpolation policy is specified by `FILL` parameter; or nothing is returned.
|
||||
|
||||
```
|
||||
taos> SELECT INTERP(*) FROM meters WHERE tbname IN ('d636') AND ts='2017-7-14 18:40:00.005';
|
||||
|
@ -819,7 +819,7 @@ SELECT DERIVATIVE(field_name, time_interval, ignore_negative) FROM tb_name [WHER
|
|||
|
||||
**More explanations**:
|
||||
|
||||
- It is available from version 2.1.3.0, the number of result rows is the number of total rows in the time range subtracted by one, no output for the first row.\
|
||||
- It is available from version 2.1.3.0, the number of result rows is the number of total rows in the time range subtracted by one, no output for the first row.
|
||||
- It can be used together with `GROUP BY tbname` against a STable.
|
||||
|
||||
**Examples**:
|
||||
|
@ -882,7 +882,7 @@ SELECT CEIL(field_name) FROM { tb_name | stb_name } [WHERE clause];
|
|||
|
||||
**Applicable table types**: table, STable
|
||||
|
||||
**Applicable nested query**: inner query and outer query
|
||||
**Applicable nested query**: Inner query and outer query
|
||||
|
||||
**More explanations**:
|
||||
|
||||
|
|
Loading…
Reference in New Issue