题解 | #牛客的课程订单分析(二)#
牛客的课程订单分析(二)
http://www.nowcoder.com/practice/4ca4137cb490420cad06d2147ae67456
运用窗口函数,通过count()来知道 成功订单的个数 创建新的表单得以查询
select distinct user_id from
(select *, count(status)over(partition by user_id) as NUM_product from order_info
where status='completed' and date>'2025-10-15' and product_name in('C++','Java','Python')) as A
where NUM_product>=2