query-00933bf19f0435a33a964fcb9c0dbb82
title: DOIs of works that are citing or cited by works on a given topic PREFIX target: http://www.wikidata.org/entity/Q112158389
SELECT DISTINCT
(ENCODE_FOR_URI(?doi_) AS ?doi)
?doi_ WITH { SELECT ?cite_work WHERE { ?work wdt:P921 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 on a given topic
PREFIX target: <http://www.wikidata.org/entity/Q112158389>
SELECT DISTINCT
# (ENCODE_FOR_URI(?doi_) AS ?doi)
?doi_
WHERE {
{
SELECT ?cite_work
WHERE {
?work wdt:P921 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")
v3("?doi_"):::projected
v1("?work")
c2([http://www.wikidata.org/entity/Q112158389]):::iri
v1 --"wdt:P921"--> 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