Skip to content

Instantly share code, notes, and snippets.

@hpaul
Created May 22, 2019 14:49
Show Gist options
  • Select an option

  • Save hpaul/62866beffcc320bba21a455d13a6f4e9 to your computer and use it in GitHub Desktop.

Select an option

Save hpaul/62866beffcc320bba21a455d13a6f4e9 to your computer and use it in GitHub Desktop.
Extract most cited authors
SELECT
author.id,
coauthors.co_list,
json_extract(author.affiliation_current, '$.affiliation-country') AS country_origin,
author.cited_by_count
FROM
author
INNER JOIN coauthors ON author.id = coauthors.id
WHERE
author.cat LIKE '%BIOC%'
AND country_origin IN ('Austria', 'Belgium', 'Bulgaria', 'Croatia', 'Cyprus', 'Czech Republic', 'Denmark', 'Estonia', 'Finland', 'France', 'Germany', 'Greece', 'Hungary', 'Ireland', 'Italy', 'Latvia', 'Lithuania', 'Luxembourg', 'Malta', 'Netherlands', 'Poland', 'Portugal', 'Romania', 'Slovakia', 'Slovenia', 'Spain', 'Sweden', 'United Kingdom')
ORDER BY
author.cited_by_count DESC
LIMIT 1200
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment