add order by clause

This commit is contained in:
Paul Trowbridge 2017-10-19 09:25:07 -04:00
parent 995eb181c1
commit bc3cecec09

View File

@ -10,5 +10,8 @@ FROM
s.srce = t.srce
LEFT JOIN LATERAL JSONB_ARRAY_ELEMENTS_TEXT(defn->'unique_constraint'->'fields') WITH ORDINALITY ae(e, rn) ON TRUE
GROUP BY
t.srce
,(ae.e::text[])[1]
ORDER BY
t.srce
,(ae.e::text[])[1]