query-744e6abc947de572db4b19c637c4805b

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#>
#defaultView:Map
SELECT ?item ?itemLabel ?coord ?layer
WHERE 
{
  ?item wdt:P31/wdt:P279* wd:Q134447.
  ?item wdt:P625 ?coord.
  optional {?item wdt:P730 ?retired .}
  optional {?item wdt:P729 ?inservice .}
  BIND(
    IF(bound(?retired), "retired",
    IF(bound(?inservice), "in service",
    "unknown"))
    AS ?layer).
  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; v2("?coord"):::projected v4("?inservice") v1("?item"):::projected v5("?layer"):::projected v3("?retired") a1((" ")) c8(["bd:serviceParam"]):::iri c3(["wd:Q134447"]):::iri c10(["#91;AUTO_LANGUAGE#93;,en"]):::literal v1 --"wdt:P31"--> a1 a1 --"wdt:P279"--> c3 v1 --"wdt:P625"--> v2 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P730".-> v3 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P729".-> v4 end bind0[/"if(bound(?retired),'retired',if(bound(?inservice),'in service','unknown'))"/] v3 --o bind0 v4 --o bind0 bind0 --as--o v5 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c8 --"wikibase:language"--> c10 end