query-ae531391749bc78e848f6be939b0b826
title: DOIs of works that are citing or cited by works by a given author PREFIX target: http://www.wikidata.org/entity/Q20895785
SELECT DISTINCT (ENCODE_FOR_URI(?doi_) AS ?doi) WITH { SELECT ?cite_work WHERE { ?work wdt:P50 target: {?cite_work wdt:P2860 ?work .} UNION {?cite_work ^wdt:P2860 ?work .} } GROUP BY ?cite_work } AS %result WHERE { INCLUDE %result ?cite_work wdt:P356 ?doi_ . }
Use at
- https://query.wikidata.org/sparql
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
#title: DOIs of works that are citing or cited by works by a given author
PREFIX target: <http://www.wikidata.org/entity/Q20895785>
SELECT DISTINCT (ENCODE_FOR_URI(?doi_) AS ?doi)
WHERE {
{
SELECT ?cite_work
WHERE {
?work wdt:P50 target:
{?cite_work wdt:P2860 ?work .}
UNION
{?cite_work ^wdt:P2860 ?work .}
}
GROUP BY ?cite_work
} ?cite_work wdt:P356 ?doi_ .
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?cite_work")
v4("?doi")
v3("?doi_"):::projected
v1("?work")
c2([http://www.wikidata.org/entity/Q20895785]):::iri
v1 --"wdt:P50"--> c2
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
v1 --"wdt:P2860"--> v2
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v2 --"wdt:P2860"--> v1
end
union0r <== or ==> union0l
end
v2 --"wdt:P356"--> v3
bind0[/"encode-for-uri(?doi_)"/]
v3 --o bind0
bind0 --as--o v4