mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-16 11:22:12 +00:00
26 lines
1.7 KiB
SQL
26 lines
1.7 KiB
SQL
SELECT toIntervalSecond(5) AS interval, toDateTime('2017-01-01 00:00:00') + interval AS res;
|
|
SELECT toIntervalMinute(5) AS interval, toDateTime('2017-01-01 00:00:00') + interval AS res;
|
|
SELECT toIntervalHour(5) AS interval, toDateTime('2017-01-01 00:00:00') + interval AS res;
|
|
SELECT toIntervalDay(5) AS interval, toDateTime('2017-01-01 00:00:00') + interval AS res;
|
|
SELECT toIntervalMonth(5) AS interval, toDateTime('2017-01-01 00:00:00') + interval AS res;
|
|
SELECT toIntervalQuarter(5) AS interval, toDateTime('2017-01-01 00:00:00') + interval AS res;
|
|
SELECT toIntervalYear(5) AS interval, toDateTime('2017-01-01 00:00:00') + interval AS res;
|
|
SELECT CAST(5 AS IntervalNanosecond);
|
|
SELECT CAST(5 AS IntervalMicrosecond);
|
|
SELECT CAST(5 AS IntervalMillisecond);
|
|
SELECT CAST(5 AS IntervalSecond);
|
|
SELECT CAST(5 AS IntervalMinute);
|
|
SELECT CAST(5 AS IntervalHour);
|
|
SELECT CAST(5 AS IntervalDay);
|
|
SELECT CAST(5 AS IntervalWeek);
|
|
SELECT CAST(5 AS IntervalMonth);
|
|
SELECT CAST(5 AS IntervalQuarter);
|
|
SELECT CAST(5 AS IntervalYear);
|
|
SELECT (SELECT toIntervalSecond(5)) AS interval, toDateTime('2017-01-01 00:00:00') + interval AS res;
|
|
SELECT (SELECT toIntervalMinute(5)) AS interval, toDateTime('2017-01-01 00:00:00') + interval AS res;
|
|
SELECT (SELECT toIntervalHour(5)) AS interval, toDateTime('2017-01-01 00:00:00') + interval AS res;
|
|
SELECT (SELECT toIntervalDay(5)) AS interval, toDateTime('2017-01-01 00:00:00') + interval AS res;
|
|
SELECT (SELECT toIntervalMonth(5)) AS interval, toDateTime('2017-01-01 00:00:00') + interval AS res;
|
|
SELECT (SELECT toIntervalQuarter(5)) AS interval, toDateTime('2017-01-01 00:00:00') + interval AS res;
|
|
SELECT (SELECT toIntervalYear(5)) AS interval, toDateTime('2017-01-01 00:00:00') + interval AS res;
|