ClickHouse/dbms/tests/queries/0_stateless/00482_subqueries_and_aliases.sql
2017-07-26 04:21:19 +03:00

6 lines
461 B
SQL

SELECT 1 FROM system.one WHERE (1, 1) IN (SELECT 1 AS x, x);
SELECT 2 FROM system.one WHERE (1, 1) IN (SELECT 1 AS x, x) AND (1, 0) IN (SELECT 1 AS x, x);
SELECT 3 FROM system.one WHERE (1, 1) IN (SELECT 1 AS x, x) OR (1, 0) IN (SELECT 1 AS x, x);
SELECT 4 FROM system.one WHERE (1, 1) IN (SELECT 1 AS x, x) AND (1, 0) IN (SELECT 1 AS x, toUInt8(x - 1));
SELECT 5 FROM system.one WHERE (1, 1) IN (SELECT 1 AS x, x) OR (1, 0) IN (SELECT 1 AS x, toUInt8(x - 1));