同一个代码块无限用,好耶!

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