WITH MonthlyStats AS (SELECT STRFTIME('%m', admission_date) as month, SUM(admission_cost) as total_cost FROM admissions GROUP BY month) SELECT month, total_cost FROM MonthlyStats ORDER BY month;
Write your query and click "Run Query" (Ctrl + Enter) to see results and testcase validation.