select T.*
from (
select *
from order_info
where date > '2025-10-15'
and product_name in ('C++', 'Python', 'Java')
and status = 'completed'
) T
where 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(*) > 1
)
order by id

两个子查询的解法