ClickHouse/tests/queries/0_stateless/00974_full_outer_join.sql

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

22 lines
393 B
MySQL
Raw Normal View History

2019-07-24 11:29:06 +00:00
SELECT
q0.dt,
q0.cnt,
q1.cnt2
2019-07-24 11:29:06 +00:00
FROM
(
SELECT
toDate(addDays(toDate('2015-12-01'), number)) AS dt,
sum(number) AS cnt
FROM numbers(2)
GROUP BY dt
) AS q0
ALL FULL OUTER JOIN
(
SELECT
toDate(addDays(toDate('2015-12-01'), number)) AS dt,
sum(number) AS cnt2
FROM numbers(5)
GROUP BY dt
) AS q1 ON q0.dt = q1.dt
2020-02-27 11:40:22 +00:00
ORDER BY q1.cnt2;