query-8bb62a57b1c718c09aa20ae95eaa7b9c

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 rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX psv: <http://www.wikidata.org/prop/statement/value/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#---------------------------------------------------------------------------------------
# wšě objekty w Njeswačidle
#---------------------------------------------------------------------------------------
#defaultView:Table;Map
SELECT distinct ?item ?is ?isLabel ?itemLabel_hsb ?itemLabel_de ?itemLabel_dsb ?itemDescription ?image ?lat ?lon (year(?date) as ?year) ?adresa ?adresa2 ?DenkmalID ?napis ?Commonscat
WHERE {    
  ?item (wdt:P131/wdt:P279*) wd:Q93265 .  # Liegt in Verwaltungseinheit Neschwitz (oder Unterklasse)
  OPTIONAL { ?item wdt:P18 ?image . }
  OPTIONAL {?item p:P625 ?coordinate.
  ?coordinate psv:P625 ?coordinate_node.
  ?coordinate_node wikibase:geoLatitude ?lat.
  ?coordinate_node wikibase:geoLongitude ?lon. }
  OPTIONAL { ?item wdt:P31 ?is . }
  OPTIONAL { ?item wdt:P571 ?date . }
  OPTIONAL { ?item wdt:P6375 ?adresa . }
  OPTIONAL { ?item wdt:P969 ?adresa2 . }
  OPTIONAL { ?item wdt:P1708 ?DenkmalID . }
  OPTIONAL { ?item wdt:P1684 ?napis . }
  OPTIONAL { ?item wdt:P373 ?Commonscat . }
  OPTIONAL { ?item rdfs:label ?itemLabel_hsb . FILTER(lang(?itemLabel_hsb)='hsb') }
  OPTIONAL { ?item rdfs:label ?itemLabel_de . FILTER(lang(?itemLabel_de)='de') }
  OPTIONAL { ?item rdfs:label ?itemLabel_dsb . FILTER(lang(?itemLabel_dsb)='dsb') }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "hsb,de,[AUTO_LANGUAGE]". }
  FILTER NOT EXISTS {?item wdt:P31 wd:Q262166} # ist keine Gemeinde
  FILTER NOT EXISTS {?item wdt:P31 wd:Q253019} # ist kein Gemeindeteil
  FILTER NOT EXISTS {?item wdt:P31 wd:Q532} # ist kein Dorf
  FILTER NOT EXISTS {?item wdt:P31 wd:Q4022} # ist kein Fluss
  FILTER NOT EXISTS {?item wdt:P31 wd:Q54050} # ist kein Hügel
}
ORDER BY ?item

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v16("?Commonscat"):::projected v14("?DenkmalID"):::projected v12("?adresa"):::projected v13("?adresa2"):::projected v6("?coordinate") v7("?coordinate_node") v11("?date"):::projected v5("?image"):::projected v10("?is"):::projected v1("?item"):::projected v3("?itemLabel_de"):::projected v2("?itemLabel_dsb"):::projected v4("?itemLabel_hsb"):::projected v8("?lat"):::projected v9("?lon"):::projected v15("?napis"):::projected v17("?year") a1((" ")) c2(["wd:Q54050"]):::iri c4(["wd:Q532"]):::iri c26(["bd:serviceParam"]):::iri c5(["wd:Q253019"]):::iri c6(["wd:Q262166"]):::iri c28(["hsb,de,#91;AUTO_LANGUAGE#93;"]):::literal c12(["wd:Q93265"]):::iri c3(["wd:Q4022"]):::iri f0[["not "]] subgraph f0e0["Exists Clause"] e0v1 --"p:direct/P31"--> e0c2 e0v1("?item"):::projected e0c2(["wd:Q54050"]):::iri end f0--EXISTS--> f0e0 f0 --> v1 f0 --> c1 f0 --> c2 v1 --"p:direct/P31"--> c2 f1[["not "]] subgraph f1e1["Exists Clause"] e1v1 --"p:direct/P31"--> e1c2 e1v1("?item"):::projected e1c2(["wd:Q4022"]):::iri end f1--EXISTS--> f1e1 f1 --> v1 f1 --> c1 f1 --> c3 v1 --"p:direct/P31"--> c3 f2[["not "]] subgraph f2e2["Exists Clause"] e2v1 --"p:direct/P31"--> e2c2 e2v1("?item"):::projected e2c2(["wd:Q532"]):::iri end f2--EXISTS--> f2e2 f2 --> v1 f2 --> c1 f2 --> c4 v1 --"p:direct/P31"--> c4 f3[["not "]] subgraph f3e3["Exists Clause"] e3v1 --"p:direct/P31"--> e3c2 e3v1("?item"):::projected e3c2(["wd:Q253019"]):::iri end f3--EXISTS--> f3e3 f3 --> v1 f3 --> c1 f3 --> c5 v1 --"p:direct/P31"--> c5 f4[["not "]] subgraph f4e4["Exists Clause"] e4v1 --"p:direct/P31"--> e4c2 e4v1("?item"):::projected e4c2(["wd:Q262166"]):::iri end f4--EXISTS--> f4e4 f4 --> v1 f4 --> c1 f4 --> c6 v1 --"p:direct/P31"--> c6 v1 --"p:direct/P131"--> a1 a1 --"p:direct/P279"--> c12 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v1 -."p:direct/P18".-> v5 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v1 -."p:P625".-> v6 v6 --"p:statement/value/P625"--> v7 v7 --"wikibase:geoLatitude"--> v8 v7 --"wikibase:geoLongitude"--> v9 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v1 -."p:direct/P31".-> v10 end subgraph optional3["(optional)"] style optional3 fill:#bbf,stroke-dasharray: 5 5; v1 -."p:direct/P571".-> v11 end subgraph optional4["(optional)"] style optional4 fill:#bbf,stroke-dasharray: 5 5; v1 -."p:direct/P6375".-> v12 end subgraph optional5["(optional)"] style optional5 fill:#bbf,stroke-dasharray: 5 5; v1 -."p:direct/P969".-> v13 end subgraph optional6["(optional)"] style optional6 fill:#bbf,stroke-dasharray: 5 5; v1 -."p:direct/P1708".-> v14 end subgraph optional7["(optional)"] style optional7 fill:#bbf,stroke-dasharray: 5 5; v1 -."p:direct/P1684".-> v15 end subgraph optional8["(optional)"] style optional8 fill:#bbf,stroke-dasharray: 5 5; v1 -."p:direct/P373".-> v16 end subgraph optional9["(optional)"] style optional9 fill:#bbf,stroke-dasharray: 5 5; v1 -."rdfs:label".-> v4 end subgraph optional10["(optional)"] style optional10 fill:#bbf,stroke-dasharray: 5 5; v1 -."rdfs:label".-> v3 end subgraph optional11["(optional)"] style optional11 fill:#bbf,stroke-dasharray: 5 5; v1 -."rdfs:label".-> v2 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c26 --"wikibase:language"--> c28 end bind5[/"year-from-dateTime(?date)"/] v11 --o bind5 bind5 --as--o v17