mysql> select * from t1;
+---+------+------+
| a | b | c |
+---+------+------+
| 1 | a | 10 |
| 2 | a | 20 |
| 3 | a | 15 |
| 4 | b | 30 |
| 5 | b | 25 |
| 6 | c | 50 |
| 7 | c | 60 |
| 8 | d | 30 |
+---+------+------+
8 rows in set (0.00 sec)
mysql> select a.* from t1 a join (select b,max(c) as mc from t1 group by b) b on a.b=b.b and a.c=b.mc;
+---+------+------+
| a | b | c |
+---+------+------+
| 2 | a | 20 |
| 4 | b | 30 |
| 7 | c | 60 |
| 8 | d | 30 |
+---+------+------+
4 rows in set (0.00 sec)