select t_name from t,
(select t.t_id t_id,count(*) count from t,s,c where t.t_id=c.t_id and s.s_id=c.s_id and c.cname='大班' group by t.t_id) a,
(select t.t_id t_id,count(*) count from t,s,c where t.t_id=c.t_id and s.s_id=c.s_id and c.cname='小班' group by t.t_id) b
where t.t_id=a.t_id
and t.t_id=b.t_id
and a.count>b.count