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

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

http://www.nowcoder.com/practice/c93d2079282f4943a3771ca6fd081c23

select t.user_id, t.first_buy_date, t.num from
(select , count() over(partition by user_id) as num,
min(date) over(partition by user_id) as first_buy_date
from order_info
where product_name in ('C++','Java','Python')
and status='completed'
and date >'2025-10-15') t
where t.num >=2
group by t.user_id
开窗函数min()over(partition by ) 的用法

全部评论

相关推荐

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