query-9ffb89af60967736d4ea943e048192b8

rq turtle/ttl

TODO

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#>
# algunes coses de Barcelona sense barri (o districte)
SELECT DISTINCT  ?item ?itemLabel  ?layer ?layerLabel ?coord WHERE {
  VALUES ?layer {wd:Q721747 wd:Q22808403 wd:Q2175765 wd:Q928830 wd:Q174782 wd:Q79007 wd:Q787113}
  ?item wdt:P31 ?layer.
  ?item wdt:P131+ wd:Q1492.
  ?item wdt:P625 ?coord.
    OPTIONAL {
    ?item wdt:P131+ ?div.
    ?div wdt:P31 wd:Q790344 # barri Q75135432, districte Q790344.
  }
  FILTER (!BOUND(?div))
  SERVICE wikibase:label {
    bd:serviceParam wikibase:language "[AUTO_LANGUAGE],ca,en,es,fr,de" . 
  }
}
#defaultView:Map

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v4("?coord"):::projected v1("?div") v3("?item"):::projected v2("?layer"):::projected c7(["bd:serviceParam"]):::iri c3(["wd:Q1492"]):::iri c5(["wd:Q790344"]):::iri c9(["#91;AUTO_LANGUAGE#93;,ca,en,es,fr,de"]):::literal f0[["not bound(?div)"]] f0 --> v1 bind1[/VALUES ?layer/] bind1-->v2 bind10(["wd:Q721747"]) bind10 --> bind1 bind11(["wd:Q22808403"]) bind11 --> bind1 bind12(["wd:Q2175765"]) bind12 --> bind1 bind13(["wd:Q928830"]) bind13 --> bind1 bind14(["wd:Q174782"]) bind14 --> bind1 bind15(["wd:Q79007"]) bind15 --> bind1 bind16(["wd:Q787113"]) bind16 --> bind1 v3 --"wdt:P31"--> v2 v3 --"wdt:P131"--> c3 v3 --"wdt:P625"--> v4 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v3 -."wdt:P131".-> v1 v1 --"wdt:P31"--> c5 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c7 --"wikibase:language"--> c9 end