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