借鉴了一下别人的经验用having 少做1个子查询 select * from order_info 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(*)>=2 ) and product_name in ('C++','Java','Python') and status='completed' and date>'2025-10-15' order by id;
点赞

相关推荐

牛客吹哨人:哨哥晚点统一更新到黑名单:能救一个是一个!26届毁意向毁约裁员黑名单https://www.nowcoder.com/discuss/1525833
点赞 评论 收藏
分享
牛客网
牛客网在线编程
牛客网题解
牛客企业服务