DB Error: ERROR: for SELECT DISTINCT, ORDER BY expressions must appear in select list LINE 1: ...f.seq is null then 1 else 0 end, "psf"."seq" ASC, "st"."sett... ^