0
影付き領域の別個の人数を取得しようとしています。3つのテーブルの左外部結合
customer key
A234 1
A345 4
A12 5
A989 6
HIVEクエリ:
select count(distinct(a.customer))
from (
select *
from cust
where key in (1,2,3)) c
left outer join (
select *
from cust
where key in (4,5)) a on a.customer= c.customer where c.customer is null
join
(select *
from cust
where key in (6,7,8,9)) d on c.customer = d.customer and d.customer is null;
エラー:
が 'NULL' の近くに '参加'
でEOFの欠落を次のように表構造がある
おかげで、すべての3つの円の交点にデータを取得するため、これは、クエリを記述するための正しい方法です。 select count(*) from(c.customer cust cから) グループby c.customer 合計の場合(1,2,3,4,5,6,7,8,9 )then 1 else 0 end)> 0 )c – user3447653
@ user3447653。 。 。はい、それはうまくいくでしょう。 –