select a.id,a.is_group_buy,c.name
from (select ,count()over(partition by user_id) cnt
from order_info o
where date > '2025-10-15'
and status = 'completed'
and product_name in ('C++','Java','Python')) a
left join client c
on a.client_id = c.id and a.is_group_buy = 'No'
where a.cnt >= 2
order by a.id;