* A. Pagaltzis <[EMAIL PROTECTED]> [2006-05-03 00:30]: > I tried to do it with a join to see if that would work better, > but I’m too frazzled to figure it out right now.
I must be more frazzled than I thought. SELECT n1.name, COUNT( n2.name ) rank FROM names n1 CROSS JOIN names n2 WHERE n2.name < n1.name GROUP BY n1.name ORDER BY rank; Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/>