Created
November 16, 2018 12:53
-
-
Save AnjaneyuluBatta505/a05293f1e2cef33248b6fcd1850f5f58 to your computer and use it in GitHub Desktop.
merge array of arrays in postgresql with array_agg
This file contains hidden or 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