query-04815620c0c92ded08a369fb1ca64786
TODO
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX psv: <http://www.wikidata.org/prop/statement/value/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT distinct ?item ?itemLabel ?country_of_citizenship ?country_of_citizenshipLabel
WHERE
{
?item wdt:P27 ?country_of_citizenship . # item has a country of citizenship
?country_of_citizenship wdt:P576 ?dissolved . # country of citizenship has a dissolved date
?item wdt:P569 ?dob . # item has date of birth
?item p:P569/psv:P569 ?timenode .
?timenode wikibase:timePrecision 11 . # dob date has precision to the day
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" } # get Labels for items
FILTER (?dob >?dissolved) # show items only when birth after dissolution
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?country_of_citizenship"):::projected
v2("?dissolved")
v1("?dob")
v3("?item"):::projected
v5("?timenode")
a1((" "))
c7(["11^^xsd:integer"]):::literal
c9(["bd:serviceParam"]):::iri
c11(["en"]):::literal
f0[["?dob > ?dissolved"]]
f0 --> v1
f0 --> v2
v3 --"p:direct/P27"--> v4
v4 --"p:direct/P576"--> v2
v3 --"p:direct/P569"--> v1
v3 --"p:P569"--> a1
a1 --"p:statement/value/P569"--> v5
v5 --"wikibase:timePrecision"--> c7
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c9 --"wikibase:language"--> c11
end