Multiple Tables with Reddit, Q10

SELECT 
  subreddits.name,
  AVG(posts.score) AS 'score'
FROM subreddits
INNER JOIN posts
GROUP BY subreddits.name
ORDER BY 2 DESC

Used the code above to generate to try and answer question 10 but the average score is the same between different subreddits. Was wondering if anyone was aware of my mistakes here, thanks in advance!

You’re joining the tables, but you haven’t specified what to join them ON

Click for another hint

You’re missing the ON after your JOIN, so it isn’t matching up the records the way you intend.

subreddits.id and posts.subreddit_id would be good to use.


Using the ON (command?) seems to give me the same results. Also tried to change the INNER JOIN to LEFT JOIN and the results don’t seem to have changed.

I used your query and added ON subreddits.id = posts.subreddit_id

The results are updating for me.

The query I wrote for this project when I completed it used a LEFT JOIN (and I rounded it), but the INNER JOIN produces the same results in this case.