ClickHouse/tests/queries/0_stateless/02160_monthname.sql

72 lines
3.0 KiB
MySQL
Raw Normal View History

2022-01-06 16:33:01 +00:00
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);