query-abc558664f6e9d3202b4a1dc7fdd7334
Propertiesinstance of (P31)shares border with (P47)reference URL (P854)
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 prov: <http://www.w3.org/ns/prov#>
PREFIX pr: <http://www.wikidata.org/prop/reference/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?place1 ?place1Label ?place2 ?place2Label ?refurl WHERE {
?place1 p:P47 ?statement;
wdt:P31 ?place1type.
?statement ps:P47 ?place2;
FILTER (?place1type IN (wd:Q180673, wd:Q1138494, wd:Q15979307, wd:Q202435, wd:Q15060255)).
OPTIONAL {?statement prov:wasDerivedFrom/pr:P854 ?refurl}
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("?place1"):::projected
v1("?place1type")
v4("?place2"):::projected
v5("?refurl"):::projected
v3("?statement")
a1((" "))
c12(["bd:serviceParam"]):::iri
c14(["#91;AUTO_LANGUAGE#93;,en"]):::literal
list0c2(["wd:Q1138494"]):::iri
list0c3(["wd:Q15979307"]):::iri
list0c4(["wd:Q202435"]):::iri
list0c5(["wd:Q15060255"]):::iri
list0c1(["wd:Q180673"]):::iri
list0c1 --o f0
list0c2 --o f0
list0c3 --o f0
list0c4 --o f0
list0c5 --o f0
f0[[" in "]]
f0 --> v1
v2 --"p:P47"--> v3
v2 --"p:direct/P31"--> v1
v3 --"p:statement/P47"--> v4
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v3 -."prov:wasDerivedFrom".-> a1
a1 --"p:reference/P854"--> v5
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c12 --"wikibase:language"--> c14
end