基于手机销售新表,统计各手机品牌销量top10:Hql语句统计TopN并建表,表字段包含:手机品牌、销售量:
操作指令: (1)create table iphone_sail_top10 row format delimited fields terminated by ',' as select brand,sum(sail_count) as scount from goods_sail_info group by brand sort by scount desc limit 10; (2)desc iphone_sail_top10; (3)select * from iphone_sail_top10; |