query-d8abbf2b646ac54e70614e63e3dc2cb9
Сядзібы
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
#Усе пружанскія сядзібы
SELECT ?item ?itemLabel ?image ?coord WHERE {
{ ?item wdt:P31 wd:Q16560. } # палацы
UNION
{ ?item wdt:P31 wd:Q23413. } # замкі
UNION
{ ?item wdt:P31 wd:Q57831. } # фартэцыі
UNION
{ ?item wdt:P31 wd:Q879050. } # сядзібы
UNION
{ ?item wdt:P31 wd:Q12292478. } # сядзібы
{ ?item wdt:P131 wd:Q1885543. } # у Пружанскім раёне
UNION
{
?item wdt:P131 ?loc.
?loc wdt:P131* wd:Q1885543.
} # або ў населеным пункце Пружанскага раёну
OPTIONAL { ?item wdt:P625 ?coord. }
OPTIONAL { ?item wdt:P18 ?image. }
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],be-tarask". }
}
GROUP BY ?item ?itemLabel ?image ?coord
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?coord"):::projected
v4("?image"):::projected
v1("?item"):::projected
v2("?loc")
c8(["wd:Q1885543"]):::iri
c2(["wd:Q16560"]):::iri
c6(["wd:Q12292478"]):::iri
c3(["wd:Q23413"]):::iri
c12(["bd:serviceParam"]):::iri
c4(["wd:Q57831"]):::iri
c14(["#91;AUTO_LANGUAGE#93;,be-tarask"]):::literal
c5(["wd:Q879050"]):::iri
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
subgraph union1[" Union "]
subgraph union1l[" "]
style union1l fill:#abf,stroke-dasharray: 3 3;
subgraph union2[" Union "]
subgraph union2l[" "]
style union2l fill:#abf,stroke-dasharray: 3 3;
subgraph union3[" Union "]
subgraph union3l[" "]
style union3l fill:#abf,stroke-dasharray: 3 3;
v1 --"wdt:P31"--> c6
end
subgraph union3r[" "]
style union3r fill:#abf,stroke-dasharray: 3 3;
v1 --"wdt:P31"--> c5
end
union3r <== or ==> union3l
end
end
subgraph union2r[" "]
style union2r fill:#abf,stroke-dasharray: 3 3;
v1 --"wdt:P31"--> c4
end
union2r <== or ==> union2l
end
end
subgraph union1r[" "]
style union1r fill:#abf,stroke-dasharray: 3 3;
v1 --"wdt:P31"--> c3
end
union1r <== or ==> union1l
end
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v1 --"wdt:P31"--> c2
end
union0r <== or ==> union0l
end
subgraph union4[" Union "]
subgraph union4l[" "]
style union4l fill:#abf,stroke-dasharray: 3 3;
v1 --"wdt:P131"--> v2
v2 --"wdt:P131"--> c8
end
subgraph union4r[" "]
style union4r fill:#abf,stroke-dasharray: 3 3;
v1 --"wdt:P131"--> c8
end
union4r <== or ==> union4l
end
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P625".-> v3
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P18".-> v4
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c12 --"wikibase:language"--> c14
end