ClickHouse/tests/queries/0_stateless/01136_multiple_sets.sql

13 lines
492 B
MySQL
Raw Normal View History

drop table if exists test;
create table test (project LowCardinality(String)) engine=MergeTree() order by project;
insert into test values ('val1'), ('val2'), ('val3');
select sum(project in ('val1', 'val2')) from test;
set force_primary_key = 1;
select sum(project in ('val1', 'val2')) from test where project in ('val1', 'val2');
select count() from test where project in ('val1', 'val2');
select project in ('val1', 'val2') from test where project in ('val1', 'val2');
drop table test;