ClickHouse/tests/queries/0_stateless/01518_select_in_null.sql
2020-10-16 19:07:16 -03:00

91 lines
7.1 KiB
SQL

DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (`cA` String, `c1` String) ENGINE = MergeTree ORDER BY (cA, c1);
insert into t1 select 'AAAAAAAAAAA', 'BBBBBB';
select count() from t1 where c1 in (select 'BBBBBB' union all select null);
select count() from t1 where c1 in (select 'BBBBBB' union all select null);
select count() from t1 where c1 in (select 'BBBBBB' union all select null);
select count() from t1 where c1 in (select 'BBBBBB' union all select null);
select count() from t1 where c1 in (select 'BBBBBB' union all select null);
select count() from t1 where c1 in (select 'BBBBBB' union all select null);
select count() from t1 where c1 in (select 'BBBBBB' union all select null);
select count() from t1 where c1 in (select 'BBBBBB' union all select null);
select count() from t1 where c1 in (select 'BBBBBB' union all select null);
select count() from t1 where c1 in (select 'BBBBBB' union all select null);
select count() from t1 where c1 in (select 'BBBBBB' union all select null);
select count() from t1 where c1 in (select 'BBBBBB' union all select null);
select count() from t1 where c1 in (select 'BBBBBB' union all select null);
select count() from t1 where c1 in (select 'BBBBBB' union all select null);
select count() from t1 where c1 in (select 'BBBBBB' union all select null);
select count() from t1 where c1 in (select 'BBBBBB' union all select null);
select count() from t1 where c1 in (select 'BBBBBB' union all select null);
select count() from t1 where c1 in (select 'BBBBBB' union all select null);
select count() from t1 where c1 in (select 'BBBBBB' union all select null);
select count() from t1 where c1 in (select 'BBBBBB' union all select null);
select count() from t1 where c1 in (select 'BBBBBB' union all select null);
select count() from t1 where c1 in (select 'BBBBBB' union all select null);
select count() from t1 where c1 in (select 'BBBBBB' union all select null);
select count() from t1 where c1 in (select 'BBBBBB' union all select null);
select count() from t1 where c1 in (select 'BBBBBB' union all select null);
select count() from t1 where c1 in (select 'BBBBBB' union all select null);
select count() from t1 where c1 in (select 'BBBBBB' union all select null);
select count() from t1 where c1 in (select 'BBBBBB' union all select null);
select count() from t1 where c1 in (select 'BBBBBB' union all select null);
select count() from t1 where c1 in (select 'BBBBBB' union all select null);
select count() from t1 where c1 in (select 'BBBBBB' union all select null);
select count() from t1 where c1 in (select 'BBBBBB' union all select null);
select count() from t1 where c1 in (select 'BBBBBB' union all select null);
select count() from t1 where c1 in (select 'BBBBBB' union all select null);
select count() from t1 where c1 in (select 'BBBBBB' union all select null);
select count() from t1 where c1 in (select 'BBBBBB' union all select null);
select count() from t1 where c1 in (select 'BBBBBB' union all select null);
select count() from t1 where c1 in (select 'BBBBBB' union all select null);
select count() from t1 where c1 in (select 'BBBBBB' union all select null);
select count() from t1 where c1 in (select 'BBBBBB' union all select null);
select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null);
select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null);
select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null);
select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null);
select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null);
select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null);
select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null);
select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null);
select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null);
select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null);
select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null);
select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null);
select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null);
select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null);
select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null);
select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null);
select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null);
select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null);
select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null);
select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null);
select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null);
select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null);
select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null);
select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null);
select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null);
select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null);
select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null);
select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null);
select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null);
select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null);
select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null);
select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null);
select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null);
select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null);
select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null);
select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null);
select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null);
select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null);
select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null);
select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null);
DROP TABLE t1;