高手帮优化下如何改成 join 格式
select count(id) ,IFNULL(sum(s_num),0) ,IFNULL(sum(p),0),
(select count(id) from es where `status` in(2,3) and t_id in(1,2,3)) as a,
(select count(id) from r where r.stat=0 and c_id in(
select id from c where stat >0 and t_id in(1,2,3))) as b,
(select count(id) from c where c.stat >0 and t_id in(1,2,3) and c.p > (
select count(user_id) from s where c.id = s.c_id)) as cc,
(select count(user_id) from s where c_id in(
select id from c where stat >0 and t_id in(1,2,3))) dd
from c where `stat`!=0 and t_id in(1,2,3);
其中s表超级大,百万行,其他表几万行,如何改成 join 格式,并减少c,s表的调用次数