Skip to content

Instantly share code, notes, and snippets.

@rsimon
Last active August 29, 2015 14:01
Show Gist options
  • Save rsimon/2c050ba033e2f6881d91 to your computer and use it in GitHub Desktop.
Save rsimon/2c050ba033e2f6881d91 to your computer and use it in GitHub Desktop.
Getting top unidentified places from Recogito DB
SELECT
-- concat (toponym, toponym_corrected), count(*)
coalesce(toponym, toponym_corrected), count(*)
FROM annotations WHERE
(status = 'NOT_IDENTIFYABLE' OR status = 'NO_SUITABLE_MATCH' OR status = 'AMBIGUOUS' OR status = 'MULTIPLE')
-- GROUP BY concat(toponym, toponym_corrected)
GROUP BY coalesce(toponym, toponym_corrected)
ORDER BY count desc ;
@rsimon
Copy link
Author

rsimon commented May 13, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment