2017.01.02

黑广三条重要的数据库核心语句:

20151102黑广isp

selectday,dim_oem_id,count(*),count(distinct dim_user_hid) fromfact_vod_history where dim_isp_id=20151102 and day='2017-01-04' group byday,dim_oem_id;

insert overwrite local directory'/tmp/300016' row format delimited fields terminated by ','

selectday,dim_oem_id,dim_movie_mid,count(*),count(distinct dim_user_hid) fromfact_vod_history where dim_isp_id=20151102 and day='2017-01-04' group byday,dim_oem_id,dim_movie_mid;

insert overwrite local directory'/tmp/300017' row format delimited fields terminated by ','

selectday,dim_oem_id,dim_live_channel_id,count(*),count(distinct dim_user_hid)from fact_vod_history where dim_isp_id=20151102 and day='2017-01-04' group byday,dim_oem_id,dim_live_channel_id;

你可能感兴趣的:(2017.01.02)