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