query-2a0b4aa992c4f7a18fbe2e70c99fa4ac

rq turtle/ttl

TODO

Use at

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?item ?itemLabel ?value 
{
  ?item wdt:P434 ?value .
  {?item wdt:P31 wd:Q215380.}
  UNION
  {?item wdt:P31 wd:Q5.}
  optional {?item rdfs:label ?itemLabel . filter(lang(?itemLabel)="en")}
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?item"):::projected v1("?itemLabel"):::projected v3("?value"):::projected c5(["wd:Q5"]):::iri c4(["wd:Q215380"]):::iri v2 --"wdt:P434"--> v3 subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; v2 --"wdt:P31"--> c5 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v2 --"wdt:P31"--> c4 end union0r <== or ==> union0l end subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v2 -."rdfs:label".-> v1 end