I have the query below which works in MySQL but fails in Postgresql with the following error:
ERROR: column "status" does not exist