01
SQL: total revenue per month.
Show answer
SELECT DATE_TRUNC('month', order_date) AS month, SUM(amount) AS revenue
FROM orders GROUP BY 1 ORDER BY 1;
-- MySQL: DATE_FORMAT(order_date, '%Y-%m')
4 SQL questions with answers for business analyst roles. Tick what you have solved to track your progress.