题解 | #牛客的课程订单分析(七)#
牛客的课程订单分析(七)
https://www.nowcoder.com/practice/d6f4a37f966145da8900ba9edcc4c068
select
ifnull(name,"GroupBuy") source, count(client_id) cnt
from
(select
*, count(user_id)over(partition by user_id) number
from order_info
where product_name in ("C++","Python","Java")
and status = 'completed'
and date > '2025-10-10') s
left join client
on s.client_id = client.id
where number>1
group by client_id
order by source
ifnull(), 函数值得复习下。可以把null转化成指定变量。
卓越教育公司福利 132人发布
