ClickHouse/tests/queries/0_stateless/00537_quarters.sql

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

2 lines
350 B
MySQL
Raw Normal View History

SELECT (toDate('2017-01-01') AS base) + INTERVAL number MONTH AS d, toDateTime(d, 'UTC') AS t, toQuarter(d) AS qd, toQuarter(t) AS qt, toStartOfQuarter(d) AS sqd, toStartOfQuarter(t) AS sqt, toRelativeQuarterNum(d) - toRelativeQuarterNum(base) AS qdiff_d, toRelativeQuarterNum(t) - toRelativeQuarterNum(base) as qdiff_t FROM system.numbers LIMIT 24;