Change SQL to Postgres.