ClickHouse/tests/queries/1_stateful/00044_any_left_join_string.sql

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

25 lines
405 B
MySQL
Raw Normal View History

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