题解 | #牛客的课程订单分析(七)#
牛客的课程订单分析(七)
http://www.nowcoder.com/practice/d6f4a37f966145da8900ba9edcc4c068
select IFNULL(c.`name`,'GroupBuy') source,count(*) cnt from( select id,client_id,is_group_buy,count(*) over(partition by user_id) n from order_info where date>'2025-10-15' and `status`='completed' and product_name in('C++','Java','Python'))t left join client c on t.client_id=c.id where t.n>1 group by t.client_id order by source