query-d77e1520c6fd28a9ba245d2d4b6f0778
Пример запроса: члены Госдумы, родившиеся вне России
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 DISTINCT ?person ?personLabel ?birth_place ?birth_placeLabel ?birth_place_coords ?birth_country ?birth_countryLabelWHERE WHERE {
?person wdt:P39 wd:Q17276321.
?person wdt:P31 wd:Q5.
?person wdt:P19 ?birth_place.
?birth_place wdt:P625 ?birth_place_coords.
OPTIONAL { ?birth_place wdt:P17 ?birth_country. }
SERVICE wikibase:label { bd:serviceParam wikibase:language "ru". }
FILTER(?birth_country != wd:Q159)
FILTER(?birth_country != wd:Q15180)
FILTER(?birth_country != wd:Q34266)
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?birth_country"):::projected
v3("?birth_place"):::projected
v4("?birth_place_coords"):::projected
v2("?person"):::projected
c14(["ru"]):::literal
c5(["wd:Q17276321"]):::iri
c12(["bd:serviceParam"]):::iri
c7(["wd:Q5"]):::iri
f0[["?birth_country != 'wd:Q34266'"]]
f0 --> v1
f1[["?birth_country != 'wd:Q15180'"]]
f1 --> v1
f2[["?birth_country != 'wd:Q159'"]]
f2 --> v1
v2 --"wdt:P39"--> c5
v2 --"wdt:P31"--> c7
v2 --"wdt:P19"--> v3
v3 --"wdt:P625"--> v4
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v3 -."wdt:P17".-> v1
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c12 --"wikibase:language"--> c14
end