TSColNumToList function
The TSColNumToList function takes a TimeSeries column and returns a list (collection of rows) containing the values of one of the columns in the elements of the time series. Null elements are not added to the list.
Syntax
TSColNumToList(ts TimeSeries,
colnum integer)
returns list
- ts
- The time series to act on.
- colnum
- The column to return.
Description
The column is specified by its number; column numbering starts at 1, with the first column following the time stamp column.
Because this aggregate function can return rows of any type, the return value must be explicitly cast at runtime.
Returns
A list (collection of rows).
Example
This query returns a list of all
values in the column high:
select * from table((select
TSColNumToList(stock_data, 1)::list(real
not null) from daily_stocks));