select t.class
from table_name t
where t.class in (
select cc.class from (
select a.class,count(a.username) count from table_name a
where a.pcrioermance > 80
group by a.class) as cc where count > 2)
group by t.class
having avg(t.pcrioermance) > 60;
抱歉我能力有限 只能写成这个样子了,希望能帮到你