2016.9.6

select count(1) from aa;

提下8月辽宁移动活跃数据,分别提供MAC明细,count(distinct day)

1.活跃天数大于0天,小于10天的用户明细,

2.活跃天数大于等于10天,小于20天的用户明细

3活跃天数大于等于20天,小于30天的用户明细。

create table aa as

insert select t.dim_user_hid,count(distinctday) as daycount from fact_vod_history t where dim_isp_id=20150505and day>='2016-08-01' and day

<='2016-08-31' group by dim_user_hid;

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

select t.dim_user_hid from aa t wheredaycount>=20 and daycount<=30;

你可能感兴趣的:(2016.9.6)