mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-25 17:12:03 +00:00
97f2a2213e
* Move some code outside dbms/src folder * Fix paths
17 lines
315 B
SQL
17 lines
315 B
SQL
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;
|