SELECT *, p.postcount FROM styper_news n LEFT JOIN (SELECT count(*) as postcount, newsid as news FROM styper_post GROUP BY newsid) p ON p.news = n.newsid ORDER BY n.newsid DESCTable '1147300_KzE.styper_news' doesn't exist