SQL Call
SELECT * FROM SAX (
ON finance_data3 AS "input" PARTITION BY id ORDER BY period
USING
TargetColumns ('expenditure', 'income', 'investment')
TimeColumn ('period')
OutputType ('characters')
WindowType ('global')
Accumulate ('id')
) AS dt ORDER BY id;
Output
id |
value_column |
period_start |
period_end |
saxchar |
1 |
expenditure |
1960Q1 |
1960Q1 |
a |
1 |
expenditure |
1960Q2 |
1960Q2 |
a |
1 |
expenditure |
1960Q3 |
1960Q3 |
a |
1 |
expenditure |
1960Q4 |
1960Q4 |
a |
1 |
expenditure |
1961Q1 |
1961Q1 |
b |
1 |
expenditure |
1961Q2 |
1961Q2 |
b |
1 |
expenditure |
1961Q3 |
1961Q3 |
b |
... |
... |
... |
... |
... |