准備:
表名:testscore
表字段及值
方法一:
SELECT name from testscore GROUP BY name HAVING min(score)>80
結果圖:
方法二:
SELECT DISTINCT name from testscore where name not in (select name from testscore where score<80)
結果圖:
方法三:
SELECT * from (SELECT name,min(score) 最小成績 from testscore GROUP BY name) t where t.最小成績>80
結果圖: