1. Bloggers
blogger_id
1
2
3
2. Posts
post_from_blogger_id
1
1
1
2
2
3
As
I had the same problem. These answers didn't help me. I used such a query:
SELECT *
FROM company c
ORDER BY (select count(a.company_id) from asset a where a.company_id = c.id) DESC
To this question:
SELECT *
FROM bloggers b
ORDER BY (select count(p.post_from_blogger_id) from posts p where p.post_from_blogger_id = b.blogger_id) DESC