mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 23:52:03 +00:00
Add test for monthName
This commit is contained in:
parent
c0892f6e6c
commit
b9e69296da
12
tests/queries/0_stateless/02160_monthname.reference
Normal file
12
tests/queries/0_stateless/02160_monthname.reference
Normal file
@ -0,0 +1,12 @@
|
||||
January January January
|
||||
February February February
|
||||
March March March
|
||||
April April April
|
||||
May May May
|
||||
June June June
|
||||
July July July
|
||||
August August August
|
||||
September September September
|
||||
October October October
|
||||
November November November
|
||||
December December December
|
72
tests/queries/0_stateless/02160_monthname.sql
Normal file
72
tests/queries/0_stateless/02160_monthname.sql
Normal file
@ -0,0 +1,72 @@
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user