Skip to content

Instantly share code, notes, and snippets.

@kasramp
Created May 1, 2020 22:31
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 kasramp/dc93d5d85e87d4544408c2fc4468698a to your computer and use it in GitHub Desktop.
Save kasramp/dc93d5d85e87d4544408c2fc4468698a to your computer and use it in GitHub Desktop.
SELECT JSON_ARRAYAGG(JSON_OBJECT('id', id, 'firstName', first_name, 'lastName', last_name, 'age', age)) FROM users;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment