ClickHouse/tests/queries/0_stateless/00590_limit_by_column_removal.sql

4 lines
288 B
MySQL
Raw Normal View History

2018-03-01 07:47:09 +00:00
SELECT x FROM (SELECT 1 AS x, 2 AS y) LIMIT 1 BY y;
SELECT x FROM (SELECT number AS x, number + 1 AS y FROM system.numbers LIMIT 10) ORDER BY y LIMIT 1 BY y;
SELECT sum(x) FROM (SELECT x, y FROM (SELECT number AS x, number + 1 AS y FROM system.numbers LIMIT 10) ORDER BY y LIMIT 1 BY y);