#select 表达式会进行判断---如果符合条件,会返回一个1或者0,所以这儿用来如果<60则返回1#只需要把返回的加起进行比较,如果大于2,则不满足条SELECT name,sum(score<60) as gk,AVG(score) from result GROUP BY name having gk>=2;