上一题改改就好了
SELECT case o.is_group_buy WHEN 'Yes' then 'GroupBuy' else c.name end d,count(1) FROM order_info o LEFT JOIN client c ON o.client_id=c.id WHERE user_id in (SELECT user_id FROM order_info WHERE product_name in('C++','JAVA','Python') and status ='completed' and date>'2025-10-15' GROUP BY user_id HAVING count(status)>=2) AND product_name in('C++','JAVA','Python') and status ='completed' and date>'2025-10-15' GROUP BY d order by d