query-dc64b12738c1df6c8584e4be67bd02c2
TODO
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#>
#Co-occurrence (filtered) displayed for single article Q6679
#defaultView:Dimensions
SELECT ?drugLabel ?charnumber2 ?charnumber1 ?diseaseLabel
WHERE {
?anchor1 wdt:P12 wd:Q6679;
wdt:P10 ?charnumber1.
?anchor2 wdt:P12 wd:Q6679;
wdt:P10 ?charnumber2.
?term1 wdt:P19 ?anchor1.
?term2 wdt:P19 ?anchor2.
?term1 wdt:P15 ?disease.
?term2 wdt:P15 ?drug.
?term1 wdt:P16 "infectiousdiseases".
?term2 wdt:P16 "infectiousdiseasesdrugs".
FILTER (?charnumber2 > ?charnumber1)
FILTER (?charnumber2 - ?charnumber1 < 200)
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?anchor1")
v4("?anchor2")
v2("?charnumber1"):::projected
v1("?charnumber2"):::projected
v7("?disease")
v8("?drug")
v5("?term1")
v6("?term2")
c8(["infectiousdiseases"]):::literal
c13(["en"]):::literal
c9(["infectiousdiseasesdrugs"]):::literal
c11(["bd:serviceParam"]):::iri
c3(["wd:Q6679"]):::iri
f0[["?charnumber2 - ?charnumber1 < '200^^xsd:integer'"]]
f0 --> v1
f0 --> v2
f1[["?charnumber2 > ?charnumber1"]]
f1 --> v1
f1 --> v2
v3 --"wdt:P12"--> c3
v3 --"wdt:P10"--> v2
v4 --"wdt:P12"--> c3
v4 --"wdt:P10"--> v1
v5 --"wdt:P19"--> v3
v6 --"wdt:P19"--> v4
v5 --"wdt:P15"--> v7
v6 --"wdt:P15"--> v8
v5 --"wdt:P16"--> c8
v6 --"wdt:P16"--> c9
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c11 --"wikibase:language"--> c13
end