query-e4c8644ea6344b3b4e1ccaf86f9cc037

rq turtle/ttl

Check subclass relations for arterial hypertension (Q41861)... Query to get all valid values for symptoms and signs (P780) (P780)symptoms and signs I'm trying to get all valid values for of (Q21510865)value-type constraint (P2302)property constraint Which has (Q169872)symptom (Q1441305)clinical sign ) (P279)subclass of or (P31)instance of (This is best I can come up with TODO

Use at

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#>
SELECT DISTINCT ?item ?itemLabel WHERE {
  {
    ?item ((wdt:P31+)/(wdt:P279*))|(wdt:P279+) wd:Q169872
  }
  UNION
  {
    ?item ((wdt:P31+)/(wdt:P279*))|(wdt:P279+) wd:Q1441305
  }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?item"):::projected a1((" ")) a2((" ")) c6(["bd:serviceParam"]):::iri c3(["wd:Q169872"]):::iri c8(["#91;AUTO_LANGUAGE#93;,en"]):::literal c4(["wd:Q1441305"]):::iri subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; subgraph union1[" Union "] subgraph union1l[" "] style union1l fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P279"--> c4 end subgraph union1r[" "] style union1r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P31"--> a2 a2 --"wdt:P279"--> c4 end union1r <== or ==> union1l end end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; subgraph union2[" Union "] subgraph union2l[" "] style union2l fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P279"--> c3 end subgraph union2r[" "] style union2r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P31"--> a1 a1 --"wdt:P279"--> c3 end union2r <== or ==> union2l end end union0r <== or ==> union0l end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c6 --"wikibase:language"--> c8 end