select *
from order_info
where user_id in (
select user_id
from order_info
where date > '2025-10-15'
and product_name in ('Python', 'Java', 'C++')
and status = 'completed'
group by user_id
having count(date) >= 2
)
and date > '2025-10-15'
and product_name in ('Python', 'Java', 'C++')
and status = 'completed'
order by id;

京公网安备 11010502036488号