SELECT `row`, COUNT(row) AS `count`, FROM `table` GROUP BY `row` ORDER BY `count`;