query-f7a49f235111209f72ba5604d8756038

rq turtle/ttl

Municipis a Catalunya sense el P31 de municipi de Catalunya SELECT ?mun ?munLabel WHERE { ?mun wdt:P31 wd:Q2074737. ?mun wdt:P131* wd:Q5705. MINUS {?mun wdt:P31 wd:Q33146843} SERVICE wikibase:label { bd:serviceParam wikibase:language "ca,oc,en,es,fr". } }

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#>
# Municipis a Catalunya sense el P31 de municipi de Catalunya
SELECT ?mun ?munLabel
WHERE {
  ?mun wdt:P31 wd:Q2074737.
  ?mun wdt:P131* wd:Q5705.
  MINUS {?mun wdt:P31 wd:Q33146843}
  SERVICE wikibase:label { bd:serviceParam wikibase:language "ca,oc,en,es,fr". }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?mun"):::projected c2(["wd:Q2074737"]):::iri c4(["wd:Q5705"]):::iri c9(["ca,oc,en,es,fr"]):::literal c7(["bd:serviceParam"]):::iri c5(["wd:Q33146843"]):::iri v1 --"wdt:P31"--> c2 v1 --"wdt:P131"--> c4 subgraph minus0["MINUS"] style minus0 stroke-width:6px,fill:pink,stroke:red; v1 --"wdt:P31"--> c5 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c7 --"wikibase:language"--> c9 end