SELECT
s.name
FROM
student AS s
GROUP BY s.name
s.name
FROM
student AS s
GROUP BY s.name
HAVING s.score > 80;
因为having 后面只能跟聚合函数所以这样写是错误的。 但是把having改成 where放到group by 后面也是不对的。可以把where和group by换个位置就可以了。。
SELECT
s.name
FROM
student AS s
WHERE
s.score > 80
GROUP BY s.name;