ClickHouse/tests/queries/0_stateless/01051_scalar_optimization.sql
2020-08-20 21:19:10 +08:00

7 lines
283 B
SQL

SELECT (SELECT number FROM numbers(100) ORDER BY number LIMIT 1),
(SELECT number FROM numbers(100) ORDER BY number DESC LIMIT 1);
SELECT 1
WHERE 0=(SELECT number FROM numbers(2) ORDER BY number LIMIT 1)
AND 1=(SELECT number FROM numbers(2) ORDER BY number DESC LIMIT 1);