Skip to content

Instantly share code, notes, and snippets.

Created January 7, 2020 05:59
What would you like to do?
unnested photo array - captions...aggregated back together
select _record_id, string_agg(unnest, ', ') as photos, string_agg(photos_captions, ', ') as photos_captions from (select r._record_id, r.unnest, k.labels as photos_captions from records r join rek k on = r.unnest order by _record_id) a group by _record_id order by _record_id
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment