query-223fb006842a0efbc49809f6eb7e7e89

rq turtle/ttl

Creative works with geo locations

Use at

PREFIX bd: <http://www.bigdata.com/rdf#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wd: <http://www.wikidata.org/entity/> 
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX v: <http://www.wikidata.org/prop/statement/>

SELECT ?work ?workLabel ?location ?locationLabel ?geo  ?short_isbn ?long_isbn WHERE {   
   ?work wdt:P31/wdt:P279* wd:Q386724 .  # work
   ?work wdt:P840 ?location .            # location
   ?location wdt:P625 ?geo .             # Geo coordinates
   ?location wdt:P17 wd:Q35 .            # Location in Denmark
   OPTIONAL {?work wdt:P957 ?short_isbn } 
   OPTIONAL {?work wdt:P212 ?long_isbn } 
   SERVICE wikibase:label { bd:serviceParam wikibase:language "da,en" . } 
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?geo"):::projected v2("?location"):::projected v5("?long_isbn"):::projected v4("?short_isbn"):::projected v1("?work"):::projected a1((" ")) c7(["wd:Q35"]):::iri c11(["bd:serviceParam"]):::iri c3(["wd:Q386724"]):::iri c13(["da,en"]):::literal v1 --"p:direct/P31"--> a1 a1 --"p:direct/P279"--> c3 v1 --"p:direct/P840"--> v2 v2 --"p:direct/P625"--> v3 v2 --"p:direct/P17"--> c7 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v1 -."p:direct/P957".-> v4 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v1 -."p:direct/P212".-> v5 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c11 --"wikibase:language"--> c13 end