题解 | #牛客的课程订单分析(六)#
牛客的课程订单分析(六)
https://www.nowcoder.com/practice/c5736983c322483e9f269dd23bdf2f6f
# 先找到满足条件的记录 select a.id, a.is_group_buy, b.name from ( select id, user_id, client_id, is_group_buy from order_info where user_id in ( select user_id from order_info where date > '2025-10-15' and product_name in ('Python', 'Java', 'C++') and status = 'completed' group by user_id having count(id) >= 2 ) and date > '2025-10-15' and product_name in ('Python', 'Java', 'C++') and status = 'completed' ) as a left join client as b on a.client_id = b.id order by a.id;