Created
November 29, 2017 08:26
-
-
Save dclarke-modus/a7db8e12dc3127fd105c43144f01d6ba to your computer and use it in GitHub Desktop.
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
id, name, age | |
1, dean, 10 | |
2, dean, 10 | |
1, blah, 9 |
select name, count(name) from students group by name having count(name) > 1
dean, 2
blah, 1
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
table is called "students". Write a query that shows record that's duplicated along with the count. Example:
name, count
dean, 10
Don't show the records that isn't duplicated