cs50/6.sql

8 lines
107 B
SQL

SELECT AVG(rating)
FROM ratings
WHERE movie_id IN (
SELECT id
FROM movies
WHERE year = 2012
);