query-ad15523482fff7ac92dccf474aeedec9

rq turtle/ttl

SPARQL Marzahn-Hellersdorf (example):

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#title:Sculptures, monuments, fountains and murals im Berliner Bezirk Marzahn-Hellersdorf on a map
#defaultView:Map{"hide":["?coord"]}
SELECT DISTINCT ?id  ?item ?itemLabel ?itemDescription ?img ?coord WHERE {
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE]". }
  {
    SELECT DISTINCT ?item WHERE {
      {
        ?item p:P31 ?statement0.
        ?statement0 (ps:P31/(wdt:P279*)) wd:Q860861.
      }
      UNION
      {
        ?item p:P31 ?statement1.
        ?statement1 (ps:P31/(wdt:P279*)) wd:Q4989906.
      }
      UNION
      {
        ?item p:P31 ?statement3.
        ?statement3 (ps:P31/(wdt:P279*)) wd:Q219423.
      }
      UNION
      {
        ?item p:P31 ?statement1.
        ?statement1 (ps:P31/(wdt:P279*)) wd:Q483453.
      }      
      {
        ?item p:P131 ?statement2.
        ?statement2 (ps:P131) wd:Q119284.
      }
    }
  }
OPTIONAL { ?item wdt:P217 ?id. }
OPTIONAL { ?item wdt:P18 ?img. }
OPTIONAL { ?item wdt:P625 ?coord. }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v8("?coord"):::projected v6("?id"):::projected v7("?img"):::projected v1("?item"):::projected v2("?statement0") v3("?statement1") v5("?statement2") v4("?statement3") a1((" ")) a2((" ")) a3((" ")) a4((" ")) c9(["wd:Q4989906"]):::iri c2(["bd:serviceParam"]):::iri c11(["wd:Q483453"]):::iri c4(["#91;AUTO_LANGUAGE#93;"]):::literal c10(["wd:Q219423"]):::iri c14(["wd:Q119284"]):::iri c8(["wd:Q860861"]):::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; subgraph union1[" Union "] subgraph union1l[" "] style union1l fill:#abf,stroke-dasharray: 3 3; subgraph union2[" Union "] subgraph union2l[" "] style union2l fill:#abf,stroke-dasharray: 3 3; v1 --"p:P31"--> v3 v3 --"p:statement/P31"--> a4 a4 --"p:direct/P279"--> c11 end subgraph union2r[" "] style union2r fill:#abf,stroke-dasharray: 3 3; v1 --"p:P31"--> v4 v4 --"p:statement/P31"--> a3 a3 --"p:direct/P279"--> c10 end union2r <== or ==> union2l end end subgraph union1r[" "] style union1r fill:#abf,stroke-dasharray: 3 3; v1 --"p:P31"--> v3 v3 --"p:statement/P31"--> a2 a2 --"p:direct/P279"--> c9 end union1r <== or ==> union1l end end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v1 --"p:P31"--> v2 v2 --"p:statement/P31"--> a1 a1 --"p:direct/P279"--> c8 end union0r <== or ==> union0l end v1 --"p:P131"--> v5 v5 --"p:statement/P131"--> c14 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v1 -."p:direct/P217".-> v6 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v1 -."p:direct/P18".-> v7 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v1 -."p:direct/P625".-> v8 end