ClickHouse/dbms/tests/queries/0_stateless/00137_in_constants.sql
2016-06-07 11:23:15 +03:00

32 lines
1.6 KiB
SQL

SELECT 1 IN (SELECT 1);
SELECT materialize(1) IN (SELECT 1);
SELECT 1 IN (SELECT materialize(1));
SELECT materialize(1) IN (SELECT materialize(1));
SELECT (1, 2) IN (SELECT 1, 2);
SELECT (1, materialize(2)) IN (SELECT 1, 2);
SELECT (1, materialize(2)) IN (SELECT materialize(1), 2);
SELECT (1, materialize(2), 'Hello') IN (SELECT materialize(1), 2, 'Hello');
SELECT (1, materialize(2), materialize('Hello')) IN (SELECT materialize(1), 2, 'Hello');
SELECT (1, materialize(2), materialize('Hello')) IN (SELECT materialize(1), 2, materialize('Hello'));
SELECT (1, materialize(2), 'Hello') IN (SELECT materialize(1), 2, materialize('Hello'));
SELECT 'Hello' IN (SELECT 'Hello');
SELECT materialize('Hello') IN (SELECT 'Hello');
SELECT 'Hello' IN (SELECT materialize('Hello'));
SELECT materialize('Hello') IN (SELECT materialize('Hello'));
SELECT 2 IN (SELECT 1);
SELECT materialize(2) IN (SELECT 1);
SELECT 2 IN (SELECT materialize(1));
SELECT materialize(2) IN (SELECT materialize(1));
SELECT (1, 3) IN (SELECT 1, 2);
SELECT (1, materialize(3)) IN (SELECT 1, 2);
SELECT (1, materialize(3)) IN (SELECT materialize(1), 2);
SELECT (1, materialize(2), 'World') IN (SELECT materialize(1), 2, 'Hello');
SELECT (1, materialize(2), materialize('World')) IN (SELECT materialize(1), 2, 'Hello');
SELECT (1, materialize(2), materialize('World')) IN (SELECT materialize(1), 2, materialize('Hello'));
SELECT (1, materialize(2), 'World') IN (SELECT materialize(1), 2, materialize('Hello'));
SELECT 'World' IN (SELECT 'Hello');
SELECT materialize('World') IN (SELECT 'Hello');
SELECT 'World' IN (SELECT materialize('Hello'));
SELECT materialize('World') IN (SELECT materialize('Hello'));