在hive sql下面执行后,在结果集中返回user_id:821044249473
select distinct(t1.user_id) from b2c_d.A t1 inner join b2c_d.B t2 on t1.user_id = t2.user_id inner join b2cdc.C t3 on t1.user_id = t3.base_uid
where t1.active_rate > 0.9 and t1.micloud_usage > 0.9 and t1.user_level > 5
and t3.order_accessory_amount >100 and t3.order_accessory_amount < 3000 and t3.order_total_amount > 10000 and t3.order_total_amount < 50000
and t1.play_date > 10
and t1.user_id not in(
...
) 那么,出什么问题了?为什么结果集中包含user_id 821044249473?
谢谢
发布于 2016-02-23 09:28:39
你能更具体地说明输入是什么,你在O/P中看的是什么?从浏览SQL开始,我认为你会使用SEMI join,因为在HIVEQL中,你不能像MySQL一样使用in。
https://stackoverflow.com/questions/35548034
复制相似问题