First, why do you use a subquery?
Second, there is no column named num in table2.
Third, if you want to get result from a SQL function and not the content of the table use HAVING instead of WHERE.
SELECT t2.id, COUNT(t1.id)
FROM table2 t2
LEFT JOIN table1 t1
ON t1.creat_id = t2.id
WHERE t1.published = 1
HAVING COUNT(t1.id) > 0
GROUP BY t2.id
It is untested, but I think it will work.