This topic describes the sequence decomposition function that you can use to decompose business curves and highlight the information about the curve trends and periods.
select ts_decompose(x, y)
The following table lists the parameters of the function.
|The time sequence. The points in time along the horizontal axis are sorted in ascending order.
|Each point in time is a Unix timestamp. Unit: seconds.
|The sequence of the numeric values of the property under observation, corresponding to the specified points in time.
- The query statement is as follows:
* | select ts_decompose(stamp, value) from (select __time__ - __time__ % 60 as stamp, avg(v) as value from log GROUP BY stamp order by stamp)
- Output result
The following table lists the display items.
|The Unix timestamp of the data. Unit: seconds.
|The raw data.
|The decomposed curve trend.
|The decomposed curve period.
|The decomposed residual data.