query-7e68bff722a571da053c63f72e37ef67
Ghanaian scientists by citation count SELECT ?number_of_citing_works ?author ?authorLabel ?organization ?organizationLabel ?example_work ?example_workLabel WITH { SELECT DISTINCT ?author WHERE { ?author wdt:P27| wdt:P1416/wdt:P17 | wdt:P108/wdt:P17 wd:Q117 . } } AS %authors WITH { SELECT ?author (COUNT(DISTINCT ?citing_work) AS ?number_of_citing_works) (SAMPLE(?organization_) AS ?organization) (SAMPLE(?work) AS ?example_work) WHERE { INCLUDE %authors ?work wdt:P50 ?author . OPTIONAL { ?citing_work wdt:P2860 ?work . } OPTIONAL { ?author wdt:P1416 | wdt:P108 ?organization_ . ?organization_ wdt:P17 wd:Q43 } } GROUP BY ?author } AS %results WHERE { INCLUDE %results service wikibase:label { bd:serviceParam wikibase:language "en" . } } ORDER BY DESC(?number_of_citing_works)
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#Ghanaian scientists by citation count
SELECT
?number_of_citing_works
?author ?authorLabel
?organization ?organizationLabel
?example_work ?example_workLabel
WHERE {
{
SELECT
?author
(COUNT(DISTINCT ?citing_work) AS ?number_of_citing_works)
(SAMPLE(?organization_) AS ?organization)
(SAMPLE(?work) AS ?example_work)
WHERE {
{
SELECT DISTINCT ?author WHERE {
?author wdt:P27| wdt:P1416/wdt:P17 | wdt:P108/wdt:P17 wd:Q117 .
}
} ?work wdt:P50 ?author .
OPTIONAL { ?citing_work wdt:P2860 ?work . }
OPTIONAL {
?author wdt:P1416 | wdt:P108 ?organization_ .
?organization_ wdt:P17 wd:Q43
}
}
GROUP BY ?author
} service wikibase:label { bd:serviceParam wikibase:language "en" . }
}
ORDER BY DESC(?number_of_citing_works)