Created
May 29, 2014 06:07
-
-
Save Lukse/8634d9544c67ee0d8c18 to your computer and use it in GitHub Desktop.
Count number of times value appears in particular column in MySQL
This file contains hidden or 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
-- Duomenys: | |
-- zigmas | |
-- zigmas | |
-- petras | |
-- Rezultatai: | |
-- zigmas 2 | |
-- petras 1 | |
select name, count(*) as n FROM orders order by n GROUP BY name |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment