Skip to content

Instantly share code, notes, and snippets.

@bq1990
Created April 3, 2016 22:34
Show Gist options
  • Save bq1990/9d8ca6d321ce54749fb81710e09da7f3 to your computer and use it in GitHub Desktop.
Save bq1990/9d8ca6d321ce54749fb81710e09da7f3 to your computer and use it in GitHub Desktop.
sql select duplicate emails
select trim(lower(email)), count(*)
from "users"
group by trim(lower(email))
HAVING count(*) > 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment