select source,count()
from (select oi.
,(case when oi.is_group_buy = 'Yes' then 'GroupBuy' else c.name end) source,
count(*)over(partition by user_id) cnt
from order_info oi left join client c on oi.client_id = c.id
where date > '2025-10-15'
and status = 'completed'
and product_name in('C++','Python','Java'))t
where cnt >= 2
group by source
order by source;