I have a bunch of Users, each of whom has many Posts. Schema:
Users: id Posts: user_id, rating
How do I find all Users who have at least one po
SELECT max(p.rating), u.id from users u INNER JOIN posts p on users.id = p.user_id where p.rating > 10 group by u.id;
Additionally, this will tell you what their highest rating is.