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

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

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

select (case when t1.name is NULL then 'GroupBuy' else t1.name end) as source, count(1)
from client t1 right join
(
select *,count(id) over(partition by user_id) as number
from order_info
where datediff(date,"2025-10-15")>0
and status="completed"
and product_name in ("C++","Java","Python")
) t2
on t1.id=t2.client_id
where t2.number >1
group by t1.name
order by source;

全部评论

相关推荐

周述安:这都能聊这么多。别人要是骂我,我就会说你怎么骂人?他要是继续骂我,我就把评论删了。
点赞 评论 收藏
分享
点赞 收藏 评论
分享
牛客网
牛客企业服务