题解 | #牛客的课程订单分析(二)#

牛客的课程订单分析(二)

https://www.nowcoder.com/practice/4ca4137cb490420cad06d2147ae67456

select distinct user_id from order_info a where exists(
    select count(1) cnt from order_info b 
    where 
    product_name in ("C++","Java","Python") and status = "completed" and a.user_id = b.user_id and date>"2025-10-15"
    group by user_id 
    having cnt>=2
)
order by  user_id

exists方法

全部评论

相关推荐

找只鸡:可以,直接拉黑这个邮箱
点赞 评论 收藏
分享
点赞 收藏 评论
分享
牛客网
牛客企业服务