query-cfa409355ed44c6c914dc8280b42b40a
in addition so that I can plot both, and have marked both on a map in two different colours. (P8387)Foreign war churchyards in Norway ID I want to add one line using 07:43, 21 July 2020 (UTC)) talk (Pmt } } ."[AUTO_LANGUAGE],en" language:wikibase serviceParam:bd { label:wikibase SERVICE } ?img P18:wdt ?cem { OPTIONAL . ?coor P625:wdt ?cem } )?layer as P8387:wd(BIND . ?id P8387:wdt ?cem { UNION } )?layer as P1920:wd(BIND . ?id P1920:wdt ?cem { . Q20:wd P17:wdt ?cem { WHERE ?img ?layerLabel ?coor ?cemLabel ?cem DISTINCT SELECT #defaultView:Map{"hide":["?coor"]} 07:51, 21 July 2020 (UTC) Jura: Here we go. --- Pmt@
Use at
- https://query.wikidata.org/sparql
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{"hide":["?coor"]}
SELECT DISTINCT ?cem ?cemLabel ?coor ?layerLabel ?img
WHERE
{
{ ?cem wdt:P17 wd:Q20 .
?cem wdt:P1920 ?id . BIND(wd:P1920 as ?layer) }
UNION
{ ?cem wdt:P8387 ?id . BIND(wd:P8387 as ?layer) }
OPTIONAL { ?cem wdt:P625 ?coor }
OPTIONAL { ?cem wdt:P18 ?img }
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;
v1("?cem"):::projected
v4("?coor"):::projected
v2("?id")
v5("?img"):::projected
v4("?layer")
c8(["bd:serviceParam"]):::iri
c2(["wd:Q20"]):::iri
c10(["#91;AUTO_LANGUAGE#93;,en"]):::literal
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
v1 --"wdt:P8387"--> v2
bind0[/"'wd:P8387'"/]
bind0 --as--o v4
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v1 --"wdt:P17"--> c2
v1 --"wdt:P1920"--> v2
bind1[/"'wd:P1920'"/]
bind1 --as--o v4
end
union0r <== or ==> union0l
end
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P625".-> v4
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P18".-> v5
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c8 --"wikibase:language"--> c10
end