Last active
December 21, 2019 00:02
-
-
Save 3v0k4/453c67c26bf08c70989fa01d9ed25558 to your computer and use it in GitHub Desktop.
This file contains 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
=> SELECT films.id, films.title, films.genre, string_agg(reviews.content, E'\n') FROM films LEFT JOIN reviews ON films.id = reviews.film_id GROUP BY films.id; | |
id | title | genre | string_agg | |
----+-------------------+----------+----------------------------------------------------------- | |
3 | Arrival | scifi | | |
1 | Blade Runner 2049 | thriller | Visually stunning and thought provoking, but not flawless+ | |
| | | One of the best sequels of all time + | |
| | | Strangely boring, lacking tension and intelligence | |
2 | Inception | thriller | Amazing Directing, Captivating Plot, Overall Great |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment