query-218aba89c6267c47b5991fbe5c96aba5
Propertiesauthor (P50)cites work (P2860)ORCID iD (P496)
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#>
#defaultView:Table
SELECT
?count
?citing_author ?citing_authorLabel
# Either show the ORCID iD or construct part of a URL to search on the ORCID homepage
(COALESCE(?orcid_, CONCAT("orcid-search/quick-search/?searchQuery=", ENCODE_FOR_URI(?citing_authorLabel))) AS ?orcid)
WHERE {
{
# An author might have multiple ORCID iDs
SELECT
?count
?citing_author
(SAMPLE(?orcids) AS ?orcid_)
WHERE {
{
SELECT (COUNT(?citing_work) AS ?count) ?citing_author WHERE {
?work wdt:P50 wd:Q42712203 .
?citing_work ^wdt:P2860 ?work .
MINUS { ?citing_work wdt:P50 wd:Q42712203 }
?citing_work wdt:P50 ?citing_author .
}
GROUP BY ?citing_author
ORDER BY DESC(?count)
LIMIT 500
} OPTIONAL { ?citing_author wdt:P496 ?orcids }
}
GROUP BY ?count ?citing_author
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "en,da,de,es,fr,jp,nl,no,ru,sv,zh". }
}
ORDER BY DESC(?count)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?citing_author"):::projected
v3("?citing_work")
v5("?count"):::projected
v7("?orcid")
v6("?orcid_"):::projected
v5("?orcids")
v2("?work")
c8(["en,da,de,es,fr,jp,nl,no,ru,sv,zh"]):::literal
c2(["wd:Q42712203"]):::iri
c6(["bd:serviceParam"]):::iri
v2 --"wdt:P50"--> c2
v2 --"wdt:P2860"--> v3
subgraph minus0["MINUS"]
style minus0 stroke-width:6px,fill:pink,stroke:red;
v3 --"wdt:P50"--> c2
end
v3 --"wdt:P50"--> v4
bind2[/"count(?citing_work)"/]
v3 --o bind2
bind2 --as--o v5
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v4 -."wdt:P496".-> v5
end
bind4[/"sample(?orcids)"/]
v5 --o bind4
bind4 --as--o v6
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c6 --"wikibase:language"--> c8
end
bind5[/"?orcid_concat('orcid-search/quick-search/?searchQuery=',encode-for-uri(?citing_authorLabel))"/]
v6 --o bind5
null --o bind5
bind5 --as--o v7