with flitered_order_info as (
    select
        *,
        count(user_id) over (partition by user_id) as cnt
    from 
        order_info
    where 
        product_name in ('C++','Python','Java')
    and
        date >= '2025-10-15'
    and 
        status = 'completed'
)

select
    ifnull(c.name,'GroupBuy') as source,
    count(f_o_i.client_id) as cnt
from 
    flitered_order_info as f_o_i
left join 
    client as c
on 
    f_o_i.client_id = c.id
where 
    cnt >= 2
group by 
    c.name
order by 
    source