Schema:
select flats.id, flats.city, flats.price from flats group by flats.city order by flats.price,flats.id limit 3;