-
-
Save romelgomez/2776df1338bfbdbb8c4f3ea05c33f9a3 to your computer and use it in GitHub Desktop.
merge array of arrays in postgresql with array_agg
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--select ARRAY(select distinct unnest(array_agg(category.arr))) | |
select ARRAY(select distinct unnest(array[array[1,2,3], array[4,2,8]])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment