mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 08:32:02 +00:00
72 lines
3.0 KiB
SQL
72 lines
3.0 KiB
SQL
WITH
|
|
toDate('2021-01-14') AS date_value,
|
|
toDateTime('2021-01-14 11:22:33') AS date_time_value,
|
|
toDateTime64('2021-01-14 11:22:33', 3) AS date_time_64_value
|
|
SELECT monthName(date_value), monthName(date_time_value), monthName(date_time_64_value);
|
|
|
|
WITH
|
|
toDate('2021-02-14') AS date_value,
|
|
toDateTime('2021-02-14 11:22:33') AS date_time_value,
|
|
toDateTime64('2021-02-14 11:22:33', 3) AS date_time_64_value
|
|
SELECT monthName(date_value), monthName(date_time_value), monthName(date_time_64_value);
|
|
|
|
WITH
|
|
toDate('2021-03-14') AS date_value,
|
|
toDateTime('2021-03-14 11:22:33') AS date_time_value,
|
|
toDateTime64('2021-03-14 11:22:33', 3) AS date_time_64_value
|
|
SELECT monthName(date_value), monthName(date_time_value), monthName(date_time_64_value);
|
|
|
|
WITH
|
|
toDate('2021-04-14') AS date_value,
|
|
toDateTime('2021-04-14 11:22:33') AS date_time_value,
|
|
toDateTime64('2021-04-14 11:22:33', 3) AS date_time_64_value
|
|
SELECT monthName(date_value), monthName(date_time_value), monthName(date_time_64_value);
|
|
|
|
WITH
|
|
toDate('2021-05-14') AS date_value,
|
|
toDateTime('2021-05-14 11:22:33') AS date_time_value,
|
|
toDateTime64('2021-05-14 11:22:33', 3) AS date_time_64_value
|
|
SELECT monthName(date_value), monthName(date_time_value), monthName(date_time_64_value);
|
|
|
|
WITH
|
|
toDate('2021-06-14') AS date_value,
|
|
toDateTime('2021-06-14 11:22:33') AS date_time_value,
|
|
toDateTime64('2021-06-14 11:22:33', 3) AS date_time_64_value
|
|
SELECT monthName(date_value), monthName(date_time_value), monthName(date_time_64_value);
|
|
|
|
WITH
|
|
toDate('2021-07-14') AS date_value,
|
|
toDateTime('2021-07-14 11:22:33') AS date_time_value,
|
|
toDateTime64('2021-07-14 11:22:33', 3) AS date_time_64_value
|
|
SELECT monthName(date_value), monthName(date_time_value), monthName(date_time_64_value);
|
|
|
|
WITH
|
|
toDate('2021-08-14') AS date_value,
|
|
toDateTime('2021-08-14 11:22:33') AS date_time_value,
|
|
toDateTime64('2021-08-14 11:22:33', 3) AS date_time_64_value
|
|
SELECT monthName(date_value), monthName(date_time_value), monthName(date_time_64_value);
|
|
|
|
WITH
|
|
toDate('2021-09-14') AS date_value,
|
|
toDateTime('2021-09-14 11:22:33') AS date_time_value,
|
|
toDateTime64('2021-09-14 11:22:33', 3) AS date_time_64_value
|
|
SELECT monthName(date_value), monthName(date_time_value), monthName(date_time_64_value);
|
|
|
|
WITH
|
|
toDate('2021-10-14') AS date_value,
|
|
toDateTime('2021-10-14 11:22:33') AS date_time_value,
|
|
toDateTime64('2021-10-14 11:22:33', 3) AS date_time_64_value
|
|
SELECT monthName(date_value), monthName(date_time_value), monthName(date_time_64_value);
|
|
|
|
WITH
|
|
toDate('2021-11-14') AS date_value,
|
|
toDateTime('2021-11-14 11:22:33') AS date_time_value,
|
|
toDateTime64('2021-11-14 11:22:33', 3) AS date_time_64_value
|
|
SELECT monthName(date_value), monthName(date_time_value), monthName(date_time_64_value);
|
|
|
|
WITH
|
|
toDate('2021-12-14') AS date_value,
|
|
toDateTime('2021-12-14 11:22:33') AS date_time_value,
|
|
toDateTime64('2021-12-14 11:22:33', 3) AS date_time_64_value
|
|
SELECT monthName(date_value), monthName(date_time_value), monthName(date_time_64_value);
|