I have a table which stores IDs and the city where the store is located.
I want to list all the stores starting with the stores that are in the city where there are
SELECT count(City), City FROM table GROUP BY City ORDER BY count(City);
OR
SELECT count(City) as count, City FROM table GROUP BY City ORDER BY count;
Ahh, sorry, I was misinterpreting your question. I believe Peter Langs answer was the correct one.