mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 08:32:02 +00:00
97f2a2213e
* Move some code outside dbms/src folder * Fix paths
61 lines
3.2 KiB
SQL
61 lines
3.2 KiB
SQL
SELECT toDateTime('2017-01-01 00:00:00') + INTERVAL 0 MONTH AS x;
|
|
SELECT toDateTime('2017-01-01 00:00:00') + INTERVAL 1 MONTH AS x;
|
|
SELECT toDateTime('2017-01-01 00:00:00') + INTERVAL 11 MONTH AS x;
|
|
SELECT toDateTime('2017-01-01 00:00:00') + INTERVAL 12 MONTH AS x;
|
|
SELECT toDateTime('2017-01-01 00:00:00') + INTERVAL 13 MONTH AS x;
|
|
SELECT toDateTime('2017-01-01 00:00:00') + INTERVAL -1 MONTH AS x;
|
|
SELECT toDateTime('2017-01-01 00:00:00') + INTERVAL -11 MONTH AS x;
|
|
SELECT toDateTime('2017-01-01 00:00:00') + INTERVAL -12 MONTH AS x;
|
|
SELECT toDateTime('2017-01-01 00:00:00') + INTERVAL -13 MONTH AS x;
|
|
|
|
SELECT toDateTime('2017-01-01 00:00:00') - INTERVAL 0 MONTH AS x;
|
|
SELECT toDateTime('2017-01-01 00:00:00') - INTERVAL 1 MONTH AS x;
|
|
SELECT toDateTime('2017-01-01 00:00:00') - INTERVAL 11 MONTH AS x;
|
|
SELECT toDateTime('2017-01-01 00:00:00') - INTERVAL 12 MONTH AS x;
|
|
SELECT toDateTime('2017-01-01 00:00:00') - INTERVAL 13 MONTH AS x;
|
|
SELECT toDateTime('2017-01-01 00:00:00') - INTERVAL -1 MONTH AS x;
|
|
SELECT toDateTime('2017-01-01 00:00:00') - INTERVAL -11 MONTH AS x;
|
|
SELECT toDateTime('2017-01-01 00:00:00') - INTERVAL -12 MONTH AS x;
|
|
SELECT toDateTime('2017-01-01 00:00:00') - INTERVAL -13 MONTH AS x;
|
|
|
|
SELECT toDate('2017-01-01') + INTERVAL 0 MONTH AS x;
|
|
SELECT toDate('2017-01-01') + INTERVAL 1 MONTH AS x;
|
|
SELECT toDate('2017-01-01') + INTERVAL 11 MONTH AS x;
|
|
SELECT toDate('2017-01-01') + INTERVAL 12 MONTH AS x;
|
|
SELECT toDate('2017-01-01') + INTERVAL 13 MONTH AS x;
|
|
SELECT toDate('2017-01-01') + INTERVAL -1 MONTH AS x;
|
|
SELECT toDate('2017-01-01') + INTERVAL -11 MONTH AS x;
|
|
SELECT toDate('2017-01-01') + INTERVAL -12 MONTH AS x;
|
|
SELECT toDate('2017-01-01') + INTERVAL -13 MONTH AS x;
|
|
|
|
SELECT toDate('2017-01-01') - INTERVAL 0 MONTH AS x;
|
|
SELECT toDate('2017-01-01') - INTERVAL 1 MONTH AS x;
|
|
SELECT toDate('2017-01-01') - INTERVAL 11 MONTH AS x;
|
|
SELECT toDate('2017-01-01') - INTERVAL 12 MONTH AS x;
|
|
SELECT toDate('2017-01-01') - INTERVAL 13 MONTH AS x;
|
|
SELECT toDate('2017-01-01') - INTERVAL -1 MONTH AS x;
|
|
SELECT toDate('2017-01-01') - INTERVAL -11 MONTH AS x;
|
|
SELECT toDate('2017-01-01') - INTERVAL -12 MONTH AS x;
|
|
SELECT toDate('2017-01-01') - INTERVAL -13 MONTH AS x;
|
|
|
|
SELECT toDateTime('2017-01-01 00:00:00') + INTERVAL 0 YEAR AS x;
|
|
SELECT toDateTime('2017-01-01 00:00:00') + INTERVAL 1 YEAR AS x;
|
|
SELECT toDateTime('2017-01-01 00:00:00') + INTERVAL -1 YEAR AS x;
|
|
SELECT toDateTime('2017-01-01 00:00:00') - INTERVAL 0 YEAR AS x;
|
|
SELECT toDateTime('2017-01-01 00:00:00') - INTERVAL 1 YEAR AS x;
|
|
SELECT toDateTime('2017-01-01 00:00:00') - INTERVAL -1 YEAR AS x;
|
|
|
|
SELECT toDate('2017-01-01') + INTERVAL 0 YEAR AS x;
|
|
SELECT toDate('2017-01-01') + INTERVAL 1 YEAR AS x;
|
|
SELECT toDate('2017-01-01') + INTERVAL -1 YEAR AS x;
|
|
SELECT toDate('2017-01-01') - INTERVAL 0 YEAR AS x;
|
|
SELECT toDate('2017-01-01') - INTERVAL 1 YEAR AS x;
|
|
SELECT toDate('2017-01-01') - INTERVAL -1 YEAR AS x;
|
|
|
|
|
|
SELECT toDate('2017-01-01') + INTERVAL number - 15 MONTH AS x FROM system.numbers LIMIT 30;
|
|
SELECT toDate('2017-01-01') - INTERVAL number - 15 MONTH AS x FROM system.numbers LIMIT 30;
|
|
|
|
SELECT toDate('2017-01-01') + INTERVAL number - 15 YEAR AS x FROM system.numbers LIMIT 30;
|
|
SELECT toDate('2017-01-01') - INTERVAL number - 15 YEAR AS x FROM system.numbers LIMIT 30;
|