题解 | 商品销售总额分布

商品销售总额分布

https://www.nowcoder.com/practice/62909494cecd4eab8c2501167e825566

select pay_method_new, count(1) as cnt
from (
    select product_id, pay_method,
    case when (pay_method is null or pay_method='') then 'error' else pay_method end as pay_method_new
    from user_client_log
    where step='select'
) a join product_info b on a.product_id=b.product_id
where product_name='anta'
group by pay_method_new
order by cnt desc

题目中用空字符串'',is null 无法捕获,需要用 pay_method=''

全部评论
考虑南京OD的宝子们看过来,你就是我们要找的人,一对一指导,******
点赞 回复 分享
发布于 2025-08-09 16:22 贵州

相关推荐

牛客51274894...:照片认真的吗,找个专门拍证件照的几十块钱整端正点吧,要不就别加照片
点赞 评论 收藏
分享
评论
1
收藏
分享

创作者周榜

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