ClickHouse/tests/queries/0_stateless/03165_order_by_duplicate.sql

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

17 lines
300 B
MySQL
Raw Normal View History

CREATE TABLE test
ENGINE = ReplacingMergeTree
PRIMARY KEY id
AS SELECT number AS id FROM numbers(100);
EXPLAIN QUERY TREE SELECT id
FROM test FINAL
WHERE id IN (
SELECT DISTINCT id
FROM test FINAL
ORDER BY id ASC
LIMIT 4
)
ORDER BY id ASC
LIMIT 1 BY id
2024-07-12 12:49:26 +00:00
SETTINGS enable_analyzer = 1;