ROW_NUMBER() OVER
开窗函数(窗口函数)解法的一个核心是利用 PARTITION BY
对数据按 key 分组
SELECT
pageid 页码
,group_id 分类id
,prod_code 商品代码
,prod_url 商品链接
FROM
( SELECT *, ROW_NUMBER() OVER ( PARTITION BY group_id, prod_code ORDER BY updated_at) AS rn
FROM adm.adm_cwr_sportmaster_sku_nd
) d1
WHERE
d1.rn = 1
SQL:数据去重的三种方法 https://blog.csdn.net/eagle89/article/details/128511502