query-19c72546f029bd04fded5381556261b5
has Q38 and Q172579 with no pq:P580 on the Q38, but died before 1946 in any event SELECT ?human ?humanLabel WHERE { ?human wdt:P31 wd:Q5; p:P27 ?statement. ?statement ps:P27 wd:Q38. filter not exists {?statement pq:P580 ?start.} ?human wdt:P27 wd:Q172579. ?human wdt:P570 ?dod. FILTER("1946-00-00"^^xsd:dateTime <= ?dod) SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],it,en". } }
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 ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
# has Q38 and Q172579 with no pq:P580 on the Q38, but died before 1946 in any event
SELECT ?human ?humanLabel WHERE {
?human wdt:P31 wd:Q5;
p:P27 ?statement.
?statement ps:P27 wd:Q38.
filter not exists {?statement pq:P580 ?start.}
?human wdt:P27 wd:Q172579.
?human wdt:P570 ?dod.
FILTER("1946-00-00"^^xsd:date <= ?dod)
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],it,en". }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?dod")
v4("?human"):::projected
v3("?start")
v2("?statement")
c14(["#91;AUTO_LANGUAGE#93;,it,en"]):::literal
c7(["wd:Q38"]):::iri
c12(["bd:serviceParam"]):::iri
c4(["wd:Q5"]):::iri
c9(["wd:Q172579"]):::iri
f0[["'1946-00-00^^xsd:date' <= ?dod"]]
f0 --> v1
f1[["not "]]
subgraph f1e0["Exists Clause"]
e0v1 --"p:qualifier/P580"--> e0v2
e0v2("?start"):::projected
e0v1("?statement"):::projected
end
f1--EXISTS--> f1e0
f1 --> v2
f1 --> c2
f1 --> v3
v2 --"p:qualifier/P580"--> v3
v4 --"p:direct/P31"--> c4
v4 --"p:P27"--> v2
v2 --"p:statement/P27"--> c7
v4 --"p:direct/P27"--> c9
v4 --"p:direct/P570"--> v1
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c12 --"wikibase:language"--> c14
end