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