query-bbfdd1f4f729394aaa53ca2549ddc093
TODO
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 ps: <http://www.wikidata.org/prop/statement/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?ID ?IDLabel ?coor ?twin ?twinLabel ?twincoord WHERE {
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE]". }
?ID wdt:P31 wd:Q22927616.
?ID wdt:P31 wd:Q5119.
?ID wdt:P625 ?coor.
OPTIONAL { ?ID p:P190 [ps:P190 ?twin].
?twin wdt:P625 ?twincoord.
}
}
ORDER BY (?IDLabel) (?twinLabel)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?ID"):::projected
v1("?IDLabel"):::projected
v4("?coor"):::projected
v5("?twin"):::projected
v2("?twinLabel"):::projected
v6("?twincoord"):::projected
a1((" "))
c2(["bd:serviceParam"]):::iri
c4(["#91;AUTO_LANGUAGE#93;"]):::literal
c6(["wd:Q22927616"]):::iri
c7(["wd:Q5119"]):::iri
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c2 --"wikibase:language"--> c4
end
v3 --"p:direct/P31"--> c6
v3 --"p:direct/P31"--> c7
v3 --"p:direct/P625"--> v4
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
a1 -."p:statement/P190".-> v5
v3 --"p:P190"--> a1
v5 --"p:direct/P625"--> v6
end