Skip to content

Instantly share code, notes, and snippets.

@knightq
Created April 24, 2013 13:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save knightq/5452182 to your computer and use it in GitHub Desktop.
Save knightq/5452182 to your computer and use it in GitHub Desktop.
Using array_agg in Postgres – powerful and flexible. Further explanation on http://craigkerstiens.com/2013/04/17/array-agg/?utm_source=postgresweekly&utm_medium=email
select array_to_string(array_agg(projects.name), ',')) as projects ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment