account_users
-----
id | primary_key
posts
-----
post_id | primary_key
author | foreign key to account_users.id
Let’s say I have 2 tables. account_users has the users. posts holds the posts.
How can I select all users where count(*) of posts are more than 5?
Try this