query-471a703b70af9378ea1c1058adbb0e82

rq turtle/ttl

All coordinate-equipped items in Lithuania

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 ps: <http://www.wikidata.org/prop/statement/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#title:All coordinate-equipped items in Lithuania
#defaultView:Map
SELECT ?item ?coord ?itemLabel ?layer
WHERE
{
    ?item wdt:P17 wd:Q37 .
    ?item p:P625 [ ps:P625 ?coord; psv:P625 ?coordV ] .
    ?item wdt:P31 ?type .
    ?coordV wikibase:geoLongitude ?longitude .
    OPTIONAL { ?type rdfs:label ?layer. FILTER(LANG(?layer) = "en"). }
    SERVICE wikibase:label {
      bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" .
    }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?coord"):::projected v4("?coordV") v2("?item"):::projected v1("?layer"):::projected v6("?longitude") v5("?type") a1((" ")) c3(["wd:Q37"]):::iri c11(["bd:serviceParam"]):::iri c13(["#91;AUTO_LANGUAGE#93;,en"]):::literal v2 --"p:direct/P17"--> c3 a1 --"p:statement/P625"--> v3 a1 --"p:statement/value/P625"--> v4 v2 --"p:P625"--> a1 v2 --"p:direct/P31"--> v5 v4 --"wikibase:geoLongitude"--> v6 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v5 -."rdfs:label".-> v1 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c11 --"wikibase:language"--> c13 end