题解 | #牛客的课程订单分析(六)#
牛客的课程订单分析(六)
https://www.nowcoder.com/practice/c5736983c322483e9f269dd23bdf2f6f
#id+is_group_buy+client_id(非团显示客户端名字,团显示null) id升序 #2025-10-15后 下单>1 购买C/J/P 成功 select a.id ,is_group_buy ,c.name client_name#(非团显示客户端名字,团显示null)???实际这样团显示的是None #,ifnull(a.name,'FULL')#???如果按题意显示NULL应改成这样 from ( select * ,count(user_id)over(partition by user_id) cnt#总单数 from order_info where date>'2025-10-15'#2025-10-15后 and product_name in ('C++','Java','Python')#购买C/J/P and status='completed'#成功 #2025-10-15后 购买C/J/P 成功 ) a left join client c on c.id=a.client_id where cnt>1#下单>1 order by 1#id升序