query-c77fc940b282f8fe77fe0dbfaaba8b4d
Славутасьці
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 ?катLabel WHERE {
?item wdt:P1435 ?кат # славутасьці
{ ?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 ?катLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?coord"):::projected
v5("?image"):::projected
v1("?item"):::projected
v3("?loc")
v2("?кат")
c3(["wd:Q1885543"]):::iri
c7(["bd:serviceParam"]):::iri
c9(["#91;AUTO_LANGUAGE#93;,be-tarask"]):::literal
v1 --"wdt:P1435"--> v2
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
v1 --"wdt:P131"--> v3
v3 --"wdt:P131"--> c3
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v1 --"wdt:P131"--> c3
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;
c7 --"wikibase:language"--> c9
end