Skip to content

Instantly share code, notes, and snippets.

@davorbadrov
Last active August 6, 2017 17:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davorbadrov/521765a080395bd64dfb2dc9656e9962 to your computer and use it in GitHub Desktop.
Save davorbadrov/521765a080395bd64dfb2dc9656e9962 to your computer and use it in GitHub Desktop.
SQL - Find multiple entries inside a table for given values.
# find multiple entries for a certain fields
select count(*), field1, field2 from some_table group by field1, field2 having count(*) > 1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment