ClickHouse/tests/queries/0_stateless/00859_distinct_with_join.sql

14 lines
492 B
MySQL
Raw Normal View History

2019-04-12 17:04:38 +00:00
drop table if exists fooL;
drop table if exists fooR;
create table fooL (a Int32, v String) engine = Memory;
create table fooR (a Int32, v String) engine = Memory;
insert into fooL select number, 'L' || toString(number) from numbers(2);
insert into fooL select number, 'LL' || toString(number) from numbers(2);
insert into fooR select number, 'R' || toString(number) from numbers(2);
2019-12-02 18:07:27 +00:00
select distinct a from fooL semi left join fooR using(a) order by a;
2019-04-12 17:04:38 +00:00
drop table fooL;
drop table fooR;