select o.user_id,min(o.date) first_buy_date,count(o.product_name) cnt
from order_info o 
join 
    (select distinct 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) t
on o.user_id = t.user_id
where product_name in ("C++","Java","Python")
        and status = 'completed'
        and date > '2025-10-15'
group by o.user_id
order by o.user_id;