题解 | 商品id数据清洗统计
商品id数据清洗统计
https://www.nowcoder.com/practice/c985ecbd820b46e6bafa858f6600126d
SELECT
SUBSTRING_INDEX(`order_id`,'_',-1) AS `product_id`,
count(*) OVER(PARTITION BY SUBSTRING_INDEX(`order_id`,'_',-1) ) AS `cnt`
FROM `order_log`
ORDER BY `cnt` DESC
LIMIT 1;