I have this MySQL query that makes use of MONTH()
and YEAR()
:
SELECT
MONTH(created_at) AS month,
YEAR(created_at) AS year
FROM users
GROUP BY MONTH(created_at), YEAR(created_at)
ORDER BY YEAR(created_at), MONTH(created_at)
How would I modify that query to work with PostgreSQL?