ClickHouse/dbms/tests/queries/1_stateful/00088_global_in_one_shard_and_rows_before_limit.sql
2018-08-07 20:08:51 +03:00

3 lines
222 B
SQL

SET output_format_write_statistics = 0;
SELECT EventDate, count() FROM remote('127.0.0.1', test.hits) WHERE UserID GLOBAL IN (SELECT UserID FROM test.hits) GROUP BY EventDate ORDER BY EventDate LIMIT 5 FORMAT JSONCompact;