Skip to content

Instantly share code, notes, and snippets.

@zmajstor
Created May 20, 2014 21:15
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 zmajstor/4c15f9d92613edc5ab99 to your computer and use it in GitHub Desktop.
Save zmajstor/4c15f9d92613edc5ab99 to your computer and use it in GitHub Desktop.
Find_by_SQL rows with duplicate attribute value
Device.find_by_sql "select udid, count(*) from devices group by udid having count(*) > 1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment