- Fix invalid query on postgreSQL