SELECT users.name, COUNT(*) AS c FROM changes, users WHERE changes.user=users.user GROUP BY changes.user ORDER BY c; +----------------+------+ | name | c | +----------------+------+ | smedero | 1 | | takkaria | 1 | | dglazkov | 1 | | DavidBaron | 1 | | hsivonen | 1 | | gsnedders | 2 | | arpetti | 2 | | Tab Atkins | 2 | | Mounir Lamouri | 2 | | jcranmer | 2 | | mathias | 2 | | mjs | 4 | | dean | 4 | | lachlan.hunt | 5 | | anne | 7 | | philipj | 11 | | simonp | 53 | | MikeSmith | 111 | | zcorpan | 251 | | Ms2ger | 279 | | Hixie | 1696 | +----------------+------+