Multiple Tables with Reddit

*I need help with Extra Practice for the Reddit question 5.

Now let’s join the data from the different tables to find out some more information.

Use a LEFT JOIN with the users and posts tables to find out how many posts each user has made. Have the users table as the left table and order the data by the number of posts in descending order.

This is what I have so far:

SELECT users.username, COUNT(*) AS ‘posts_made’
FROM users
LEFT JOIN posts
ON users.id = posts.id
GROUP BY users.id
ORDER BY 2 DESC;

I am not getting any results

I can’t see anything immediately wrong with it. It might be worth editing out sections of this query to find out what does run for some basic debugging (e.g. use -- on various lines until it does run). I’m not sure but the id column could be an issue (which id is associated with which table?). I’d also suggest double-checking it’s not another query that’s causing problems (even a missing ; could block all other results in the workspace).