query-9cba6c430853a2105480630c569bb050
same but optimized(?)
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#>
SELECT ?human ?humanLabel ?nato ?natoCLabel ?paeseLabel ?inizioPaese ?finePaese?morte ?morteCLabel ?paese2Label ?inizioPaese2 ?finePaese2 WHERE {
?human wdt:P31 wd:Q5;
wdt:P27 wd:Q38;
wdt:P569 ?nato;
wdt:P19 ?natoC;
wdt:P570 ?morte;
wdt:P20 ?morteC.
?natoC p:P17 [ps:P17 ?paese; pq:P580 ?inizioPaese; pq:P582 ?finePaese].
?morteC p:P17 [ps:P17 ?paese2; pq:P580 ?inizioPaese2; pq:P582 ?finePaese2]
FILTER ("1946-06-18"^^xsd:date > ?morte)
FILTER (?inizioPaese < ?nato && ?nato < ?finePaese)
FILTER (?inizioPaese2 < ?morte && ?morte < ?finePaese2)
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],it,en". }
}
Query found at
- https://www.wikidata.org/wiki/User:Divudi85
- https://www.wikidata.org/wiki/User_talk:Ep%C3%ACdosis/Archive/2021
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v6("?finePaese"):::projected
v3("?finePaese2"):::projected
v7("?human"):::projected
v4("?inizioPaese"):::projected
v1("?inizioPaese2"):::projected
v2("?morte"):::projected
v9("?morteC")
v5("?nato"):::projected
v8("?natoC")
v10("?paese")
v11("?paese2")
a1((" "))
a2((" "))
c17(["#91;AUTO_LANGUAGE#93;,it,en"]):::literal
c5(["wd:Q38"]):::iri
c15(["bd:serviceParam"]):::iri
c3(["wd:Q5"]):::iri
f0[["?inizioPaese2 < ?morte?morte < ?finePaese2"]]
f0 --> v1
f0 --> v2
f0 --> v3
f1[["?inizioPaese < ?nato?nato < ?finePaese"]]
f1 --> v4
f1 --> v5
f1 --> v6
f2[["'1946-06-18^^xsd:date' > ?morte"]]
f2 --> v2
v7 --"p:direct/P31"--> c3
v7 --"p:direct/P27"--> c5
v7 --"p:direct/P569"--> v5
v7 --"p:direct/P19"--> v8
v7 --"p:direct/P570"--> v2
v7 --"p:direct/P20"--> v9
a1 --"p:statement/P17"--> v10
a1 --"p:qualifier/P580"--> v4
a1 --"p:qualifier/P582"--> v6
v8 --"p:P17"--> a1
a2 --"p:statement/P17"--> v11
a2 --"p:qualifier/P580"--> v1
a2 --"p:qualifier/P582"--> v3
v9 --"p:P17"--> a2
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c15 --"wikibase:language"--> c17
end