题解 | #牛客的课程订单分析(三)#
牛客的课程订单分析(三)
https://www.nowcoder.com/practice/4ae8cff2505f4d7cb68fb0ec7cf80c57
select oi.* from order_info oi inner join ( select user_id, sum( case status when 'completed' then 1 else 0 end ) completedNum from order_info where date > '2025-10-15' and product_name in ('C++', 'Python', 'Java') group by user_id having completedNum>=2 ) t1 using(user_id) where date > '2025-10-15' and product_name in ('C++', 'Python', 'Java') and status='completed' order by id