a026ae0592
* feat: add inlineDataValueClasue rule * test: update tests of select statements * feat: support flinksql window TVF grammar * test: flink sql windown TVF statement test * feat: support grouping sets grammar * test: window TVF Aggregation and Group Window Aggregation tests * test: supplemental selectAggregation with test cases * test: add Having statement test case * feat: support flinkSql over aggregation grammar * test: add over aggregation grammar test cases * test: flink sql join statement test cases * test: flink sql set Operations grammar test cases * test: flink sql limit clause test case * feat: remove allPlusUid and replace with uid * feat: support flink sql pattern recognition grammar * test: flink sql pattern recognition tests * feat: add flink sql with clause rule * test: flink sql with clasue select tests * feat: rebuild flink sql parser
53 lines
1.0 KiB
SQL
53 lines
1.0 KiB
SQL
SELECT * FROM TABLE(
|
|
TUMBLE(
|
|
DATA => TABLE Bid,
|
|
TIMECOL => DESCRIPTOR(bidtime),
|
|
SIZE => INTERVAL '10' MINUTES
|
|
)
|
|
);
|
|
|
|
SELECT window_start,
|
|
window_end,
|
|
SUM(price)
|
|
FROM TABLE(
|
|
TUMBLE(
|
|
TABLE Bid,
|
|
DESCRIPTOR(bidtime),
|
|
INTERVAL '10' MINUTES
|
|
)
|
|
)
|
|
GROUP BY window_start, window_end;
|
|
|
|
SELECT * FROM TABLE(
|
|
HOP(TABLE Bid, DESCRIPTOR(bidtime), INTERVAL '5' MINUTES, INTERVAL '10' MINUTES));
|
|
|
|
SELECT * FROM TABLE(
|
|
HOP(
|
|
DATA => TABLE Bid,
|
|
TIMECOL => DESCRIPTOR(bidtime),
|
|
SLIDE => INTERVAL '5' MINUTES,
|
|
SIZE => INTERVAL '10' MINUTES
|
|
)
|
|
);
|
|
|
|
SELECT * FROM TABLE(
|
|
CUMULATE(
|
|
DATA => TABLE Bid,
|
|
TIMECOL => DESCRIPTOR(bidtime),
|
|
STEP => INTERVAL '2' MINUTES,
|
|
SIZE => INTERVAL '10' MINUTES
|
|
)
|
|
);
|
|
|
|
SELECT window_start,
|
|
window_end,
|
|
SUM(price)
|
|
FROM TABLE(
|
|
CUMULATE(
|
|
TABLE Bid,
|
|
DESCRIPTOR(bidtime),
|
|
INTERVAL '2' MINUTES,
|
|
INTERVAL '10' MINUTES
|
|
))
|
|
GROUP BY window_start, window_end;
|