Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Not A Problem
-
1.11.1
-
None
-
None
Description
SELECT * FROM ( SELECT * , ROW_NUMBER() OVER ( PARTITION BY window_start ORDER BY gap_transactions desc ) AS rownum FROM ( SELECT TUMBLE_START(event_time, INTERVAL '5' MINUTE) AS window_start, itemId, sum(reply_gap) AS gap_transactions FROM ItemTransactions GROUP BY itemId, TUMBLE(event_time, INTERVAL '5' MINUTE) ) ) WHERE rownum <=5;
I want to get the maximum sum of every 5 minutes window.
The expected result is that there are only 5 records every 5 minutes, But the reality is that there are more than 5 pieces of data every 5 minutes.