ClickHouse/tests/queries/0_stateless/01049_window_view_window_functions.reference

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

70 lines
4.6 KiB
Plaintext
Raw Normal View History

2021-11-22 16:07:13 +00:00
-- { echo }
2021-12-07 08:14:00 +00:00
SELECT tumble(toDateTime('2020-01-09 12:00:01', 'US/Samoa'), INTERVAL 1 SECOND, 'US/Samoa');
2020-07-26 18:59:01 +00:00
('2020-01-09 12:00:01','2020-01-09 12:00:02')
2021-12-07 08:14:00 +00:00
SELECT tumble(toDateTime('2020-01-09 12:00:01', 'US/Samoa'), INTERVAL 1 MINUTE, 'US/Samoa');
2020-07-26 18:59:01 +00:00
('2020-01-09 12:00:00','2020-01-09 12:01:00')
2021-12-07 08:14:00 +00:00
SELECT tumble(toDateTime('2020-01-09 12:00:01', 'US/Samoa'), INTERVAL '1' HOUR, 'US/Samoa');
2020-07-26 18:59:01 +00:00
('2020-01-09 12:00:00','2020-01-09 13:00:00')
2021-12-07 08:14:00 +00:00
SELECT tumble(toDateTime('2020-01-09 12:00:01', 'US/Samoa'), INTERVAL '1' DAY, 'US/Samoa');
2020-07-26 18:59:01 +00:00
('2020-01-09 00:00:00','2020-01-10 00:00:00')
2021-12-07 08:14:00 +00:00
SELECT tumble(toDateTime('2020-01-09 12:00:01', 'US/Samoa'), INTERVAL 1 WEEK, 'US/Samoa');
2020-07-26 18:59:01 +00:00
('2020-01-06','2020-01-13')
2021-12-07 08:14:00 +00:00
SELECT tumble(toDateTime('2020-01-09 12:00:01', 'US/Samoa'), INTERVAL '1' MONTH, 'US/Samoa');
2020-07-26 18:59:01 +00:00
('2020-01-01','2020-02-01')
2021-12-07 08:14:00 +00:00
SELECT tumble(toDateTime('2020-01-09 12:00:01', 'US/Samoa'), INTERVAL '1' QUARTER, 'US/Samoa');
2020-07-26 18:59:01 +00:00
('2020-01-01','2020-04-01')
2021-12-07 08:14:00 +00:00
SELECT tumble(toDateTime('2020-01-09 12:00:01', 'US/Samoa'), INTERVAL '1' YEAR, 'US/Samoa');
2020-07-26 18:59:01 +00:00
('2020-01-01','2021-01-01')
2021-12-07 08:14:00 +00:00
SELECT tumble(toDateTime('2020-01-09 12:00:01', 'US/Samoa'), INTERVAL '1' DAY, 'US/Samoa');
2020-01-14 03:09:48 +00:00
('2020-01-09 00:00:00','2020-01-10 00:00:00')
2021-12-07 08:14:00 +00:00
SELECT tumbleStart(toDateTime('2020-01-09 12:00:01', 'US/Samoa'), INTERVAL '1' DAY, 'US/Samoa');
2020-01-09 00:00:00
2021-12-07 08:14:00 +00:00
SELECT toDateTime(tumbleStart(toDateTime('2020-01-09 12:00:01', 'US/Samoa'), INTERVAL '1' DAY, 'US/Samoa'), 'US/Samoa');
2020-01-14 03:09:48 +00:00
2020-01-09 00:00:00
2021-12-07 08:14:00 +00:00
SELECT toDateTime(tumbleStart(toDateTime('2020-01-09 12:00:01', 'US/Samoa'), INTERVAL '1' DAY, 'US/Samoa'), 'US/Samoa');
2020-02-02 03:54:54 +00:00
2020-01-09 00:00:00
2021-12-07 08:14:00 +00:00
SELECT tumbleStart(tumble(toDateTime('2020-01-09 12:00:01', 'US/Samoa'), INTERVAL '1' DAY, 'US/Samoa'));
2020-01-09 00:00:00
2021-12-07 08:14:00 +00:00
SELECT tumbleEnd(toDateTime('2020-01-09 12:00:01', 'US/Samoa'), INTERVAL '1' DAY, 'US/Samoa');
2020-01-10 00:00:00
2021-12-07 08:14:00 +00:00
SELECT toDateTime(tumbleEnd(toDateTime('2020-01-09 12:00:01', 'US/Samoa'), INTERVAL '1' DAY, 'US/Samoa'), 'US/Samoa');
2020-01-14 03:09:48 +00:00
2020-01-10 00:00:00
2021-12-07 08:14:00 +00:00
SELECT toDateTime(tumbleEnd(toDateTime('2020-01-09 12:00:01', 'US/Samoa'), INTERVAL '1' DAY, 'US/Samoa'), 'US/Samoa');
2020-01-14 03:09:48 +00:00
2020-01-10 00:00:00
2021-12-07 08:14:00 +00:00
SELECT tumbleEnd(tumble(toDateTime('2020-01-09 12:00:01', 'US/Samoa'), INTERVAL '1' DAY, 'US/Samoa'));
2020-01-10 00:00:00
2021-12-07 08:14:00 +00:00
SELECT hop(toDateTime('2020-01-09 12:00:01', 'US/Samoa'), INTERVAL 1 SECOND, INTERVAL 3 SECOND, 'US/Samoa');
2020-07-26 18:59:01 +00:00
('2020-01-09 11:59:59','2020-01-09 12:00:02')
2021-12-07 08:14:00 +00:00
SELECT hop(toDateTime('2020-01-09 12:00:01', 'US/Samoa'), INTERVAL 1 MINUTE, INTERVAL 3 MINUTE, 'US/Samoa');
2020-07-26 18:59:01 +00:00
('2020-01-09 11:58:00','2020-01-09 12:01:00')
2021-12-07 08:14:00 +00:00
SELECT hop(toDateTime('2020-01-09 12:00:01', 'US/Samoa'), INTERVAL 1 HOUR, INTERVAL 3 HOUR, 'US/Samoa');
2020-07-26 18:59:01 +00:00
('2020-01-09 10:00:00','2020-01-09 13:00:00')
2021-12-07 08:14:00 +00:00
SELECT hop(toDateTime('2020-01-09 12:00:01', 'US/Samoa'), INTERVAL 1 DAY, INTERVAL 3 DAY, 'US/Samoa');
2020-07-26 18:59:01 +00:00
('2020-01-07 00:00:00','2020-01-10 00:00:00')
2021-12-07 08:14:00 +00:00
SELECT hop(toDateTime('2020-01-09 12:00:01', 'US/Samoa'), INTERVAL 1 WEEK, INTERVAL 3 WEEK, 'US/Samoa');
2020-07-26 18:59:01 +00:00
('2019-12-23','2020-01-13')
2021-12-07 08:14:00 +00:00
SELECT hop(toDateTime('2020-01-09 12:00:01', 'US/Samoa'), INTERVAL 1 MONTH, INTERVAL 3 MONTH, 'US/Samoa');
2020-07-26 18:59:01 +00:00
('2019-11-01','2020-02-01')
2021-12-07 08:14:00 +00:00
SELECT hop(toDateTime('2020-01-09 12:00:01', 'US/Samoa'), INTERVAL 1 QUARTER, INTERVAL 3 QUARTER, 'US/Samoa');
2020-07-26 18:59:01 +00:00
('2019-07-01','2020-04-01')
2021-12-07 08:14:00 +00:00
SELECT hop(toDateTime('2020-01-09 12:00:01', 'US/Samoa'), INTERVAL 1 YEAR, INTERVAL 3 YEAR, 'US/Samoa');
2020-07-26 18:59:01 +00:00
('2018-01-01','2021-01-01')
2021-12-07 08:14:00 +00:00
SELECT hop(toDateTime('2020-01-09 12:00:01', 'US/Samoa'), INTERVAL '1' DAY, INTERVAL '3' DAY, 'US/Samoa');
('2020-01-07 00:00:00','2020-01-10 00:00:00')
2021-12-07 08:14:00 +00:00
SELECT hopStart(toDateTime('2020-01-09 12:00:01', 'US/Samoa'), INTERVAL '1' DAY, INTERVAL '3' DAY, 'US/Samoa');
2020-01-07 00:00:00
2021-12-07 08:14:00 +00:00
SELECT toDateTime(hopStart(toDateTime('2020-01-09 12:00:01', 'US/Samoa'), INTERVAL '1' DAY, INTERVAL '3' DAY, 'US/Samoa'), 'US/Samoa');
2020-01-14 03:09:48 +00:00
2020-01-07 00:00:00
2021-12-07 08:14:00 +00:00
SELECT toDateTime(hopStart(toDateTime('2020-01-09 12:00:01', 'US/Samoa'), INTERVAL '1' DAY, INTERVAL '3' DAY, 'US/Samoa'), 'US/Samoa');
2020-01-14 03:09:48 +00:00
2020-01-07 00:00:00
2021-12-07 08:14:00 +00:00
SELECT hopStart(hop(toDateTime('2020-01-09 12:00:01', 'US/Samoa'), INTERVAL '1' DAY, INTERVAL '3' DAY, 'US/Samoa'));
2020-01-07 00:00:00
2021-12-07 08:14:00 +00:00
SELECT hopEnd(toDateTime('2020-01-09 12:00:01', 'US/Samoa'), INTERVAL '1' DAY, INTERVAL '3' DAY, 'US/Samoa');
2020-01-10 00:00:00
2021-12-07 08:14:00 +00:00
SELECT toDateTime(hopEnd(toDateTime('2020-01-09 12:00:01', 'US/Samoa'), INTERVAL '1' DAY, INTERVAL '3' DAY, 'US/Samoa'), 'US/Samoa');
2020-03-01 18:08:52 +00:00
2020-01-10 00:00:00
2021-12-07 08:14:00 +00:00
SELECT toDateTime(hopEnd(toDateTime('2020-01-09 12:00:01', 'US/Samoa'), INTERVAL '1' DAY, INTERVAL '3' DAY, 'US/Samoa'), 'US/Samoa');
2020-03-01 18:08:52 +00:00
2020-01-10 00:00:00
2021-12-07 08:14:00 +00:00
SELECT hopEnd(hop(toDateTime('2019-01-09 12:00:01', 'US/Samoa'), INTERVAL '1' DAY, INTERVAL '3' DAY, 'US/Samoa'));
2019-01-10 00:00:00