题解 | #牛客的课程订单分析(二)#
牛客的课程订单分析(二)
https://www.nowcoder.com/practice/4ca4137cb490420cad06d2147ae67456
select distinct t.user_id from ( select user_id, count(id) over ( partition by user_id ) cnt---用窗口函数就能比较简单的写出来 from order_info where datediff(date,"2025-10-15")>0 这里需要对日期格式进行处理,不然的话筛选出来的日期不对 and status = 'completed' and product_name in ('C++', 'Python', 'Java') )t where t.cnt>=2