Skip to content

Instantly share code, notes, and snippets.

@fud
Created March 28, 2019 04:08
Show Gist options
  • Select an option

  • Save fud/6c6638d091afe1876217b1b766bfa0cf to your computer and use it in GitHub Desktop.

Select an option

Save fud/6c6638d091afe1876217b1b766bfa0cf to your computer and use it in GitHub Desktop.
Finds duplicates from a particular table in mongo.
mongo staging-hapi.geniesolutions.com.au:27017/admin --quiet --eval "DBQuery.shellBatchSize = 2000; db.auth('admin', 'XXXXXX'); db.getCollection('QuestionnaireResponse').find({}, { _id:0, 'source.reference': 1});" | sort | uniq -c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment