select count(*) as postcount,a.post_author,b.display_name as dname
from thc_posts a
inner join thc_users b ON a.post_author=b.ID
where a.post_status="publish"
group by a.post_author order by postcount desc limit 10