ClickHouse/tests/queries/1_stateful/00043_any_left_join.sql

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

19 lines
346 B
MySQL
Raw Normal View History

2023-02-03 13:34:18 +00:00
-- Tags: no-parallel-replicas
SELECT
EventDate,
count() AS hits,
any(visits)
FROM test.hits ANY LEFT JOIN
(
SELECT
StartDate AS EventDate,
sum(Sign) AS visits
FROM test.visits
GROUP BY EventDate
) USING EventDate
GROUP BY EventDate
ORDER BY hits DESC
LIMIT 10
SETTINGS joined_subquery_requires_alias = 0;