关联用户属性标签表和用户行为权重表
操作指令: (1)create table profile_user_tb row format delimited fields terminated by ',' as select a.user_id,a.tag_id as tag_id1,a.tag_name as tag_name1,a.tag_type as tag_type1,b.tag_id as tag_id2,b.tag_name as tag_name2,b.tag_type as tag_type2,c.tag_id as tag_id3,c.tag_name as tag_name3,c.tag_type as tag_type3,d.tag_id as tag_id4,d.tag_name as tag_name4,d.action_count,d.action_weight,d.tag_type as tag_type4 from (select * from profile_tag_user_gender) a join (select * from profile_tag_user_age_region) b on a.user_id = b.user_id join (select * from profile_tag_user_grade) c on b.user_id = c.user_id join (select * from profile_tag_user_action_weight) d on c.user_id = d.user_id; (2)desc profile_user_tb; |
(3)select * from profile_user_tb limit 10;