题解 | #确定最佳顾客的另一种方式(二)#

确定最佳顾客的另一种方式(二)

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

select
    cust_name,
    t.total_price
from
    Customers c,
    Orders o,
    (
        select
            order_num,
            sum(item_price * quantity) as total_price
        from
            OrderItems
        group by
            order_num
    ) t
where
    t.order_num = o.order_num
    and o.cust_id = c.cust_id
having
    t.total_price >= 1000
order by
    t.total_price

#23届找工作求助阵地##软件开发薪资爆料##我的实习求职记录##你们的毕业论文什么进度了#
全部评论
为什么我这样写也通过了,不是说where 不能和having搭配吗?
点赞 回复 分享
发布于 2023-04-05 10:35 山东

相关推荐

迷茫的大四🐶:价格这么低都能满了?
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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