ClickHouse/docs/en/sql-reference/functions/time-series-functions.md
2023-11-21 06:52:47 -08:00

984 B

slug sidebar_position sidebar_label
/en/sql-reference/functions/time-series-functions 172 Time Series

Time Series Functions

Below functions are used for time series analysis.

seriesPeriodDetectFFT

Finds the period of the given time series data using FFT Detect Period in time series data using FFT. FFT - Fast Fourier transform (https://en.wikipedia.org/wiki/Fast_Fourier_transform)

Syntax

seriesPeriodDetectFFT(series);

Arguments

  • series - An array of numeric values

Returned value

  • A real value equal to the period of time series

Type: Float64.

Examples

Query:

SELECT seriesPeriodDetectFFT([1, 4, 6, 1, 4, 6, 1, 4, 6, 1, 4, 6, 1, 4, 6, 1, 4, 6, 1, 4, 6]) AS print_0;

Result:

┌───────────print_0──────┐
│                      3 │
└────────────────────────┘