query-2bdc1a5eae1079bc299540027646b09f
Title: Estonia is used as nationality for people dead before 1991-01-01
Complex constraint from [[Property talk:Q191]]
Items with [[Property:P27|pays de citoyenneté (P27)]] equal to [[d:Q191|Estonie (Q191)]] and [[Property:P570|date de mort (P570)]] before 1991-01-01
SELECT DISTINCT ?item WHERE { ?item wdt:P27 wd:Q191 . ?item p:P569/psv:P569 ?node_born . ?item p:P570/psv:P570 ?node_dead. ?node_born wikibase:timeValue ?born . ?node_born wikibase:timePrecision ?precision_born. ?node_dead wikibase:timeValue ?dead . ?node_dead wikibase:timePrecision ?precision_dead. FILTER (?born >= "1941-01-01T00:00:00Z"^^xsd:dateTime) FILTER (?born < "1991-01-01T00:00:00Z"^^xsd:dateTime) FILTER (?dead >= "1941-01-01T00:00:00Z"^^xsd:dateTime) FILTER (?dead < "1991-01-01T00:00:00Z"^^xsd:dateTime) FILTER (?precision_born >= "9"^^xsd:integer) FILTER (?precision_dead >= "9"^^xsd:integer) }
Use at
- https://query.wikidata.org/sparql
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX psv: <http://www.wikidata.org/prop/statement/value/>
PREFIX p: <http://www.wikidata.org/prop/>
# Title: Estonia is used as nationality for people dead before 1991-01-01
# Complex constraint from [[Property talk:Q191]]
# Items with [[Property:P27|pays de citoyenneté <small>(P27)</small>]] equal to [[d:Q191|Estonie <small>(Q191)</small>]] and [[Property:P570|date de mort <small>(P570)</small>]] before 1991-01-01
SELECT DISTINCT ?item WHERE {
?item wdt:P27 wd:Q191 .
?item p:P569/psv:P569 ?node_born .
?item p:P570/psv:P570 ?node_dead.
?node_born wikibase:timeValue ?born .
?node_born wikibase:timePrecision ?precision_born.
?node_dead wikibase:timeValue ?dead .
?node_dead wikibase:timePrecision ?precision_dead.
FILTER (?born >= "1941-01-01T00:00:00Z"^^xsd:dateTime)
FILTER (?born < "1991-01-01T00:00:00Z"^^xsd:dateTime)
FILTER (?dead >= "1941-01-01T00:00:00Z"^^xsd:dateTime)
FILTER (?dead < "1991-01-01T00:00:00Z"^^xsd:dateTime)
FILTER (?precision_born >= "9"^^xsd:integer)
FILTER (?precision_dead >= "9"^^xsd:integer)
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?born")
v3("?dead")
v5("?item"):::projected
v6("?node_born")
v7("?node_dead")
v2("?precision_born")
v1("?precision_dead")
a1((" "))
a2((" "))
c5(["wd:Q191"]):::iri
f0[["?precision_dead >= '9^^xsd:integer'"]]
f0 --> v1
f1[["?precision_born >= '9^^xsd:integer'"]]
f1 --> v2
f2[["?dead < '1991-01-01T00:00:00Z^^xsd:dateTime'"]]
f2 --> v3
f3[["?dead >= '1941-01-01T00:00:00Z^^xsd:dateTime'"]]
f3 --> v3
f4[["?born < '1991-01-01T00:00:00Z^^xsd:dateTime'"]]
f4 --> v4
f5[["?born >= '1941-01-01T00:00:00Z^^xsd:dateTime'"]]
f5 --> v4
v5 --"p:direct/P27"--> c5
v5 --"p:P569"--> a1
a1 --"p:statement/value/P569"--> v6
v5 --"p:P570"--> a2
a2 --"p:statement/value/P570"--> v7
v6 --"wikibase:timeValue"--> v4
v6 --"wikibase:timePrecision"--> v2
v7 --"wikibase:timeValue"--> v3
v7 --"wikibase:timePrecision"--> v1