Celcius Posted April 6, 2010 Share Posted April 6, 2010 I need to count the number of times each occurrence of a name appears in a column and then list the top three values SELECT name FROM Passengers ... LIMIT 0,3; Or something like that. Link to comment https://forums.phpfreaks.com/topic/197716-count-the-number-of-times-a-name-appears-in-a-column/ Share on other sites More sharing options...
Celcius Posted April 6, 2010 Author Share Posted April 6, 2010 Sorry, I solved it. SELECT name, COUNT(name) FROM Passengers GROUP BY name ORDER BY COUNT(name) LIMIT 0,3; Link to comment https://forums.phpfreaks.com/topic/197716-count-the-number-of-times-a-name-appears-in-a-column/#findComment-1037606 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.