Out of resources when opening file '/var/tmp/#sql_1065d_0.MAI' (Errcode: 24)
SELECT distinct a.* , count(VID) as countvideo , sum(viewnumber) as view FROM channel a left outer join video b on a.CHID = b.channel where b.public='1' and b.active='1' group by channel ORDER BY CHID ASC