Hive分析窗口函数row_number,LAG,LEAD,FIRST_VALUE,LAST_VALUE
取top10品牌下各品牌的top10渠道row_numselecta.*from(select"品牌","渠道",sum/count()asnum,row_number()over(partitionby"品牌"orderbynumdesc)rankfrom“table_name”where品牌限制条件groupby“品牌”,“渠道”)ahavinga.rankselect*fromlxw1234