题解 | 计算商城中2021年每月的GMV

计算商城中2021年每月的GMV

https://www.nowcoder.com/practice/5005cbf5308249eda1fbf666311753bf

with a as(
    select
        date_format(event_time,'%Y-%m') as month,
        sum(total_amount) as GMV
    from tb_order_overall
    where status!=2 and year(event_time)=2021
    group by date_format(event_time,'%Y-%m')
)
select
    month,
    GMV
from a
where GMV>100000
order by GMV
;



    

全部评论

相关推荐

2025-12-29 22:34
武汉大学 Java
点赞 评论 收藏
分享
2025-11-05 15:40
已编辑
杭州电子科技大学 网络安全
点赞 评论 收藏
分享
2025-11-07 15:41
暨南大学 C++
用微笑面对困难:我面试时候,就说了句”不愧是徐波的兵“他就破房了说是
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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