query-0dcf01ea1759fe3fcba97a4c8c69be88

rq turtle/ttl

carrers de tot tipus a Barcelona SELECT DISTINCT ?item ?itemLabel ?tipus ?tipusLabel WHERE { ?item wdt:P17 wd:Q29. ?item wdt:P31 ?tipus. ?item wdt:P131 ?adm. ?adm wdt:P131 wd:Q1492. MINUS { ?item wdt:P31 []. MINUS { ?item wdt:P31/wdt:P279 wd:Q123414165. } } 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#>
# carrers de tot tipus a Barcelona
SELECT DISTINCT ?item ?itemLabel ?tipus ?tipusLabel
WHERE {
  ?item wdt:P17 wd:Q29.
  ?item wdt:P31 ?tipus.
  ?item wdt:P131 ?adm.
  ?adm wdt:P131* wd:Q1492.
  MINUS {
    ?item wdt:P31 [].
    MINUS {
      ?item wdt:P31/wdt:P279* wd:Q123414165.
    }
  }
  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; v3("?adm") v1("?item"):::projected v2("?tipus"):::projected a1((" ")) a2((" ")) c2(["wd:Q29"]):::iri c9(["bd:serviceParam"]):::iri c5(["wd:Q1492"]):::iri c7(["wd:Q123414165"]):::iri c11(["ca"]):::literal v1 --"wdt:P17"--> c2 v1 --"wdt:P31"--> v2 v1 --"wdt:P131"--> v3 v3 --"wdt:P131"--> c5 subgraph minus0["MINUS"] style minus0 stroke-width:6px,fill:pink,stroke:red; v1 --"wdt:P31"--> a1 subgraph minus1["MINUS"] style minus1 stroke-width:6px,fill:pink,stroke:red; v1 --"wdt:P31"--> a2 a2 --"wdt:P279"--> c7 end end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c9 --"wikibase:language"--> c11 end