query-9d97b4e90bbe19edf6fffee7e51f1212

rq turtle/ttl

Toutes les pièces de théâtre dont l'auteur est né/réside/décédé dans un lieu qui se trouve au Québec

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 ?item2 ?item2Label WHERE {
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
  ?item (wdt:P7937|wdt:P31) wd:Q25379.  
  ?item (wdt:P50|wdt:P170) ?item2.     # auteur/createur
  {SELECT ?item2 WHERE  { 
       ?item2 (wdt:P19|wdt:P551|wdt:P20)/wdt:P131* wd:Q176. #né/réside/décédé 
       } limit 100000 } 
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?item"):::projected v2("?item2"):::projected a1((" ")) c6(["wd:Q25379"]):::iri c2(["bd:serviceParam"]):::iri c4(["#91;AUTO_LANGUAGE#93;,en"]):::literal c14(["wd:Q176"]):::iri subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c2 --"wikibase:language"--> c4 end subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P31"--> c6 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P7937"--> c6 end union0r <== or ==> union0l end subgraph union1[" Union "] subgraph union1l[" "] style union1l fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P170"--> v2 end subgraph union1r[" "] style union1r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P50"--> v2 end union1r <== or ==> union1l end subgraph union2[" Union "] subgraph union2l[" "] style union2l fill:#abf,stroke-dasharray: 3 3; subgraph union3[" Union "] subgraph union3l[" "] style union3l fill:#abf,stroke-dasharray: 3 3; v2 --"wdt:P20"--> a1 end subgraph union3r[" "] style union3r fill:#abf,stroke-dasharray: 3 3; v2 --"wdt:P551"--> a1 end union3r <== or ==> union3l end end subgraph union2r[" "] style union2r fill:#abf,stroke-dasharray: 3 3; v2 --"wdt:P19"--> a1 end union2r <== or ==> union2l end a1 --"wdt:P131"--> c14