1.建表
create table temp.xj_qiumei_mobile_month
(mobilephone string )
row format delimited fields terminated by ‘\t’
lines terminated by ‘\n’
stored as textfile;
2.窗口函数
dense_rank()OVER(PARTITION BY a.buyerid ORDER BY to_date(a.paytime)) # 按照会员ID 对下单时间进行排序