Created
May 14, 2014 08:30
-
-
Save ilhanyumer/3b34d557bb0971ccacef to your computer and use it in GitHub Desktop.
order by unique given name
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
COUNT(*), | |
SUBSTRING_INDEX(`fullname`, ' ', 1)AS givenname | |
FROM | |
studentstable | |
GROUP BY | |
givenname | |
ORDER BY | |
COUNT(givenname); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment