高频SQL50题(基础版)_1193.每月交易I
- 开源代码
- 2025-09-18 06:54:01

高频 SQL 50 题(基础版)_1193. 每月交易 I
# Write your MySQL query statement below select substr(trans_date,1,7) as month, country, count(*) as trans_count, count(case when state='approved' THEN 1 END) as approved_count , sum(amount) as trans_total_amount , coalesce(sum(case when state='approved' THEN amount END),0) as approved_total_amount from Transactions group by month,country
高频SQL50题(基础版)_1193.每月交易I由讯客互联开源代码栏目发布,感谢您对讯客互联的认可,以及对我们原创作品以及文章的青睐,非常欢迎各位朋友分享到个人网站或者朋友圈,但转载请说明文章出处“高频SQL50题(基础版)_1193.每月交易I”