query-fcc546b95e922ea742e7184a4450b1cf

rq turtle/ttl

Playing with references (when there is one) in the query below, please? (P248)stated in Could you help me displaying

Use at

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX pr: <http://www.wikidata.org/prop/reference/>
PREFIX p: <http://www.wikidata.org/prop/>
SELECT ?item ?coord ?reference
WHERE
{
    ?item   wdt:P31/wdt:P279* wd:Q484170;
                wdt:P17 wd:Q142; wdt:P625 ?coord.
  OPTIONAL { ?item p:P625 [ ps:P625 ?coord; prov:wasDerivedFrom [ pr:P248 ?reference ] ] }.
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?coord"):::projected v1("?item"):::projected v3("?reference"):::projected a1((" ")) a2((" ")) a3((" ")) c3(["wd:Q484170"]):::iri c5(["wd:Q142"]):::iri v1 --"p:direct/P31"--> a1 a1 --"p:direct/P279"--> c3 v1 --"p:direct/P17"--> c5 v1 --"p:direct/P625"--> v2 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; a2 -."p:statement/P625".-> v2 a3 --"p:reference/P248"--> v3 a2 --"prov:wasDerivedFrom"--> a3 v1 --"p:P625"--> a2 end