I have this query using MySQL I need to convert it to PostgreSQL query
SELECT
count(*) AS aggregate
FROM
"contracts"
WHERE
DATE_FORMAT(created_at, '%Y-%c') = '2022-1'
I got this error:
Query 1 ERROR: ERROR: function date_format(timestamp without time zone, unknown) does not exist
LINE 6: DATE_FORMAT(created_at, '%Y-%c') = '2022-1'