select * from sales_info where dt = '2019-04-26';
查询每个分类下,GMV(销售额)前三的商品明细:
select a.* FROM
(
select sku_id,sku_name,category_id3,sales_count,price,sales_count*price,
row_number() over(partition by category_id3 order by sales_count*price desc) as r1
from sales_info where dt = '2019-04-26'
)a
where a.r1<=3