0
2つのパーティションテーブルがcustomer
とitems
であり、両方がcountry
とstate
カラムでパーティション化されているとします。ハイブのパーティションテーブルへの結合
これは、特定の国と州のデータを取得する必要がある場合、これらのテーブルの内容を結合する正しい方法ですか?
select
customer.id,
customer.name,
items.name,
items.value
from
customers
join items
on customers.id == items.customer_id
and customers.country == 'USA'
and customers.state == 'TX'
and items.country == 'USA'
and items.state == 'TX'
これらの条件はWHERE句に入れる必要がありますか?単純なクエリの場合
and customers.country == 'USA'
and customers.state == 'TX'
and items.country == 'USA'
and items.state == 'TX'
これらの条件はWHERE句に入れる必要があります。 – highlycaffeinated