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

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

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

select source,count()
from (select oi.
,(case when oi.is_group_buy = 'Yes' then 'GroupBuy' else c.name end) source,
count(*)over(partition by user_id) cnt
from order_info oi left join client c on oi.client_id = c.id
where date > '2025-10-15'
and status = 'completed'
and product_name in('C++','Python','Java'))t
where cnt >= 2
group by source
order by source;

全部评论

相关推荐

头像
05-12 09:14
点赞 评论 收藏
转发
1 收藏 评论
分享
牛客网
牛客企业服务