query-6302c6298109cf30b454512a8dacc7a1

rq turtle/ttl

prototipus de la query de les llistes de topònims amb UNION (topònims que són al Papiol o que banyen el Papiol) SELECT ?item ?itemLabel WHERE {
{ ?item wdt:P17 wd:Q29. ?item wdt:P131+ wd:Q15631. } UNION {wd:Q15631 wdt:P206 ?item} MINUS { ?item wdt:P31/wdt:P279 wd:Q7075. } MINUS { ?item wdt:P31/wdt:P279 wd:Q5341295. MINUS {?item wdt:P31/wdt:P279* wd:Q811979} } SERVICE wikibase:label {bd:serviceParam wikibase:language "ca".} }

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#>
#prototipus de la query de les llistes de topònims amb UNION (topònims que són al Papiol o que banyen el Papiol)
SELECT ?item ?itemLabel WHERE {   
  {
  ?item wdt:P17 wd:Q29.
  ?item wdt:P131+ wd:Q15631.
  }
  UNION
  {wd:Q15631 wdt:P206 ?item}
  MINUS { ?item wdt:P31/wdt:P279* wd:Q7075. }
  MINUS { ?item wdt:P31/wdt:P279* wd:Q5341295. 
         MINUS {?item wdt:P31/wdt:P279* wd:Q811979}
        }
    SERVICE wikibase:label {bd:serviceParam wikibase:language "ca".}
  }

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?item"):::projected a1((" ")) a2((" ")) a3((" ")) c10(["wd:Q811979"]):::iri c8(["wd:Q7075"]):::iri c9(["wd:Q5341295"]):::iri c2(["wd:Q29"]):::iri c12(["bd:serviceParam"]):::iri c4(["wd:Q15631"]):::iri c14(["ca"]):::literal subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; c4 --"wdt:P206"--> v1 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P17"--> c2 v1 --"wdt:P131"--> c4 end union0r <== or ==> union0l end subgraph minus0["MINUS"] style minus0 stroke-width:6px,fill:pink,stroke:red; v1 --"wdt:P31"--> a1 a1 --"wdt:P279"--> c8 end subgraph minus1["MINUS"] style minus1 stroke-width:6px,fill:pink,stroke:red; v1 --"wdt:P31"--> a2 a2 --"wdt:P279"--> c9 subgraph minus2["MINUS"] style minus2 stroke-width:6px,fill:pink,stroke:red; v1 --"wdt:P31"--> a3 a3 --"wdt:P279"--> c10 end end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c12 --"wikibase:language"--> c14 end