mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-29 05:00:47 +00:00
7 lines
253 B
SQL
7 lines
253 B
SQL
drop table if exists test.tab;
|
|
create table test.tab (a UInt32, b UInt32) engine = MergeTree order by b % 2 sample by b % 2;
|
|
insert into test.tab values (1, 2), (1, 4);
|
|
select a from test.tab sample 1 / 2 prewhere b = 2;
|
|
drop table if exists test.tab;
|
|
|