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