Created
September 17, 2018 05:35
-
-
Save ichux/17b64a4fd8a0e7fdeb3d967209624d9b to your computer and use it in GitHub Desktop.
demo arrays in postgres
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 | |
( n % 2 ) :: TEXT, | |
ARRAY_AGG ( n ) | |
FROM | |
generate_series ( 1, 10 ) n | |
GROUP BY | |
( n % 2 ) :: TEXT; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment