Skip to content

Instantly share code, notes, and snippets.

@mknparreira
Last active August 12, 2021 22:08
Show Gist options
  • Save mknparreira/091d26127a74de899fa146fcc7cf5934 to your computer and use it in GitHub Desktop.
Save mknparreira/091d26127a74de899fa146fcc7cf5934 to your computer and use it in GitHub Desktop.
PostegreSQL | row_to_json example
SELECT json_agg(row_to_json(ROW)) AS treeeeeee 
FROM (
   SELECT * FROM table_name					
) row
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment