query-b58531755431fe977daff9d58b033b46

rq turtle/ttl

TODO

Use at

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX schema: <http://schema.org/>
SELECT DISTINCT ?item where
{ 
   {
  SELECT ?item WHERE {  
    { ?item wdt:P291 wd:Q812 . }
    UNION  
    { ?item wdt:P291 ?place . ?place wdt:P131* wd:Q812 . }
} }  FILTER NOT EXISTS { ?wen schema:about ?item . ?wen schema:isPartOf <https://en.wikipedia.org/>.}
  ?item wdt:P31 / wdt:P279* wd:Q11032 .  
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?item"):::projected v3("?place") v1("?wen") a1((" ")) c3([https://en.wikipedia.org/]):::iri c9(["wd:Q11032"]):::iri c5(["wd:Q812"]):::iri f0[["not "]] subgraph f0e0["Exists Clause"] e0v1 --"schema:about"--> e0v2 e0v1 --"schema:isPartOf"--> e0c3 e0v2("?item"):::projected e0v1("?wen"):::projected e0c3([https://en.wikipedia.org/]):::iri end f0--EXISTS--> f0e0 f0 --> v1 f0 --> c1 f0 --> v2 f0 --> c2 f0 --> c3 v1 --"schema:about"--> v2 v1 --"schema:isPartOf"--> c3 subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; v2 --"wdt:P291"--> v3 v3 --"wdt:P131"--> c5 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v2 --"wdt:P291"--> c5 end union0r <== or ==> union0l end v2 --"wdt:P31"--> a1 a1 --"wdt:P279"--> c9