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

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

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

with t1 as (select t1.id,is_group_buy,
case when is_group_buy='Yes' then 'GroupBuy'
when is_group_buy='No' then name end source
from order_info t1
left join client t2
on t1.client_id = t2.id
where date>'2025-10-15'
and status='completed'
and product_name in ('C++','Java','Python')
and user_id in (
select user_id from order_info
where date>'2025-10-15'
and status='completed'
and product_name in ('C++','Java','Python')
group by user_id
having count(*)>1)
order by id asc)

select source,count(1) cnt
from t1
group by source order by source

全部评论

相关推荐

买蜜雪也用卷:我觉得应该没有哪个人敢说自己熟练使用git,代码分支一复杂还是得慢慢寻思一下的,不过基本的拉代码提交代码还有分支什么的是应该会
点赞 评论 收藏
分享
鬼迹人途:你去投一投尚游游戏,服务器一面,第一个图算法,做完了给你一个策略题,你给出方案他就提出低概率问题,答不上当场给你挂
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务