SQL Calls
These two calls produce the same result.
SELECT * FROM Interpolator ( ON company1_stock1 AS input_table PARTITION BY id ORDER BY period USING TimeColumn ('period') TimeInterval (86400) ValueColumns ('stockprice') AggregationType ('min[(window(2))]') ValuesBeforeFirst (0) ValuesAfterLast (0) Accumulate ('id') ) AS dt ORDER BY period;
SELECT * FROM Interpolator (
ON company1_stock1 AS input_table PARTITION BY id ORDER BY period
ON time_table1 AS time_table DIMENSION ORDER BY period
USING
TimeColumn ('period')
ValueColumns ('stockprice')
AggregationType ('min[(window(2))]')
ValuesBeforeFirst (0)
ValuesAfterLast (0)
Accumulate ('id')
) AS dt ORDER BY period;
Output
id | period | stockprice |
---|---|---|
1 | 1961-05-17 00:00:00 | 460 |
1 | 1961-05-18 00:00:00 | 457 |
1 | 1961-05-19 00:00:00 | 452 |
1 | 1961-05-20 00:00:00 | 452 |
1 | 1961-05-21 00:00:00 | 452 |
1 | 1961-05-22 00:00:00 | 452 |
1 | 1961-05-23 00:00:00 | 459 |
1 | 1961-05-24 00:00:00 | 459 |
1 | 1961-05-25 00:00:00 | 459 |
1 | 1961-05-26 00:00:00 | 463 |
1 | 1961-05-27 00:00:00 | 479 |
1 | 1961-05-28 00:00:00 | 479 |
1 | 1961-05-29 00:00:00 | 479 |
1 | 1961-05-30 00:00:00 | 490 |
1 | 1961-05-31 00:00:00 | 490 |
1 | 1961-06-01 00:00:00 | 490 |
1 | 1961-06-02 00:00:00 | 492 |
1 | 1961-06-03 00:00:00 | 498 |
1 | 1961-06-04 00:00:00 | 498 |
1 | 1961-06-05 00:00:00 | 498 |
1 | 1961-06-06 00:00:00 | 497 |
1 | 1961-06-07 00:00:00 | 496 |
1 | 1961-06-08 00:00:00 | 490 |
1 | 1961-06-09 00:00:00 | 489 |
1 | 1961-06-10 00:00:00 | 478 |
1 | 1961-06-11 00:00:00 | 478 |
1 | 1961-06-12 00:00:00 | 478 |
... | ... | ... |