Skip to content

Instantly share code, notes, and snippets.

@DakaiZhou
Last active December 14, 2021 12:54
Show Gist options
  • Save DakaiZhou/7f5e4ae809d265b2d83fa825f5a6eb3f to your computer and use it in GitHub Desktop.
Save DakaiZhou/7f5e4ae809d265b2d83fa825f5a6eb3f to your computer and use it in GitHub Desktop.
sql_tricks1
SELECT company, STRING_AGG(employee, ', ') AS employee
FROM your_table
GROUP BY company;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment