Merge pull request #19934 from taosdata/docs/cdiwadkar16-patch-1
docs:cdiwadkar16-patch-1 - example for INTERP
This commit is contained in:
commit
ad751dccac
|
@ -884,6 +884,15 @@ INTERP(expr)
|
|||
- Pseudocolumn `_irowts` can be used along with `INTERP` to return the timestamps associated with interpolation points(support after version 3.0.2.0).
|
||||
- Pseudocolumn `_isfilled` can be used along with `INTERP` to indicate whether the results are original records or data points generated by interpolation algorithm(support after version 3.0.3.0).
|
||||
|
||||
**Example**
|
||||
|
||||
- We use the smart meters example used in this documentation to illustrate how to use the INTERP function.
|
||||
- We want to downsample every 1 hour and use a linear fill for missing values. Note the order in which the "partition by" clause and the "range", "every" and "fill" parameters are used.
|
||||
|
||||
```sql
|
||||
SELECT _irowts,INTERP(current) FROM test.meters PARTITION BY TBNAME RANGE('2017-07-22 00:00:00','2017-07-24 12:25:00') EVERY(1h) FILL(LINEAR)
|
||||
```
|
||||
|
||||
### LAST
|
||||
|
||||
```sql
|
||||
|
|
Loading…
Reference in New Issue