Last active
May 13, 2024 15:47
-
-
Save dgorodnichy/18a46a5ae91550c4e599f72fac6ae3d6 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 row_number() OVER () AS id, | |
AVG(rate) AS rate, | |
Films.id AS film_id, | |
Films.title AS title, | |
Films.genre AS genre | |
FROM Films | |
LEFT OUTER JOIN Reviews ON Reviews.film_id=Films.id | |
GROUP BY Films.id; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment