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

相关推荐

点赞 评论 收藏
分享
牛客网
牛客企业服务