Last active
June 6, 2022 11:58
-
-
Save cristianodabc/20fd4af294a15b05704f81ceb28abc4b to your computer and use it in GitHub Desktop.
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
| ```sql | |
| SELECT | |
| json_agg( | |
| json_build_object( | |
| 'first_name', u.first_name, | |
| 'last_name', u.last_name, | |
| 'email', u.email | |
| ) | |
| ) FROM users AS u | |
| ``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment