The input table requires only the columns specified by the PARTITION BY clause, ORDER BY clause, and TargetColumns argument. The table can have additional columns, but the function ignores them.
Column Name | Data Type | Description |
---|---|---|
target_column | SMALLINT, INTEGER, BIGINT, NUMERIC, or DOUBLE PRECISION | Column for which to calculate the simple moving average. |
partition_column | INTEGER, BIGINT, NUMERIC, or VARCHAR | Column by which to partition the input. Input data must be partitioned such that each partition contains all rows of the column or columns whose simple moving average is to be calculated. |
order_by_column | INTEGER, BIGINT, TIME, or TIMESTAMP | Column by which to order the input. |