题解 | #牛客的课程订单分析(六)#
牛客的课程订单分析(六)
https://www.nowcoder.com/practice/c5736983c322483e9f269dd23bdf2f6f
查找这个用户在2025-10-15之后的下单成功的c++,java,python课程的订单id。 select aa.id, is_group_buy, case when is_group_buy = 'Yes' then 'None' else c.name end from order_info aa inner join (select user_id from order_info where date >'2025-10-15' and status like 'c%' and product_name in ('c++','java','python') group by user_id having count(*)>=2) b on b.user_id=aa.user_id left join client c on aa.client_id = c.id where aa.date >'2025-10-15' and aa.status like 'c%' and aa.product_name in ('c++','java','python') order by aa.id