각 월과 국가별로, 거래 횟수와 총 금액, 승인된 거래 횟수와 승인된 거래의 총 금액을 출력하라
SELECT DATE_FORMAT(trans_date,'%Y-%m') AS month
,country
,COUNT(id) AS trans_count
,SUM(CASE WHEN state ='approved' THEN 1 ELSE 0 END) AS approved_count
,SUM(amount) AS trans_total_amount
,SUM(CASE WHEN state ='approved' THEN amount ELSE 0 END) AS approved_total_amount
FROM Transactions
GROUP BY month,country