codice:
select m1.* from mytable as m1
inner join (select * from mytable order by c)
as m2 on m1.a = m2.a
group by m1.b