题解 | 牛客的课程订单分析(三)
select *
from order_info
where user_id in
(select a.user_id
from
(select user_id, count(user_id)
from order_info
where date>'2025-10-15' and status='completed' and product_name in ('C++','Java','Python')
group by user_id
having count(user_id)>=2
) a
) #该条件为找到符合要求的用户id
and date>'2025-10-15' and status='completed' and product_name in ('C++','Java','Python')
order by id asc
查看3道真题和解析
SHEIN希音公司福利 283人发布
