I'm stuck on pset7 10.sql, it keeps coming up with a misuse of aggregate function. My code is currently:
SELECT name FROM people INNER JOIN directors ON people.id = directors.person_id INNER JOIN ratings ON directors.movie_id = ratings.movie_id WHERE AVG(rating) >= 9.0
As the solution only asks for one column, I thought this would be the right way of doing it?
Thanks in advance
AVG
? The spec asks for "a movie that received a rating of at least 9.0". Each movie is independent of any others. Here is the sqlite3 doc on aggregate functions FYI.