Silver0427 :
Akina :
SELECT t1.*
FROM stu t1
JOIN ( SELECT class_id, MAX(height) height
FROM stu
GROUP BY class_id ) t2 USING (class_id, height)
If more than one student have the same maximal height over a class then all of them will be returned.