我跑下面這段代碼的時候,出現這樣的提示:
請問哪裡出問題了?
drop table if exists fz_yn3;
create table fz_yn3 as
select z.user_id,z.nick,z.appkey,z.company,z.plan,b.cust_id,b.shop_cat_name,b.gmt_create,b.seller_star_name,b.shop_start
from fz_yn2 z
left outer join
(select distinct cust_id,nick_name,shop_cat_name,gmt_create,seller_star_name,shop_start
from ad_p4p_dw.dim_p4p_customer_extra where ds=20141031) b
on z.nick=b.nick_name
group by z.user_id,z.nick,z.appkey,z.company,z.plan;
group by的一個原則,select後面的列要麼包含在group中,要麼使用聚合函數。