query-aca77d598b57348a5bd7ebafc63c0ae4
TODO
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 (SAMPLE(?nato) as ?DoB) ?natoCLabel ?paeseLabel ?inizioPaese ?finePaese (SAMPLE(?morte) as ?DoD) ?morteCLabel 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 ?statmt.
?statmt ps:P17 ?paese.
?statmt pq:P580 ?inizioPaese.
?statmt pq:P582 ?finePaese
FILTER ("1946-06-18"^^xsd:date > ?morte)
FILTER (year(?inizioPaese) < year(?nato) && year(?nato) < year(?finePaese))
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],it,en". }
} group by ?human ?humanLabel ?natoCLabel ?paeseLabel ?inizioPaese ?finePaese ?morteCLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v10("?DoB")
v11("?DoD")
v3("?finePaese"):::projected
v5("?human"):::projected
v1("?inizioPaese"):::projected
v4("?morte"):::projected
v7("?morteC")
v2("?nato"):::projected
v6("?natoC")
v9("?paese")
v8("?statmt")
c17(["#91;AUTO_LANGUAGE#93;,it,en"]):::literal
c5(["wd:Q38"]):::iri
c15(["bd:serviceParam"]):::iri
c3(["wd:Q5"]):::iri
f0[["year-from-dateTime(?inizioPaese) < year-from-dateTime(?nato)year-from-dateTime(?nato) < year-from-dateTime(?finePaese)"]]
f0 --> v1
f0 --> v2
f0 --> v3
f1[["'1946-06-18^^xsd:date' > ?morte"]]
f1 --> v4
v5 --"p:direct/P31"--> c3
v5 --"p:direct/P27"--> c5
v5 --"p:direct/P569"--> v2
v5 --"p:direct/P19"--> v6
v5 --"p:direct/P570"--> v4
v5 --"p:direct/P20"--> v7
v6 --"p:P17"--> v8
v8 --"p:statement/P17"--> v9
v8 --"p:qualifier/P580"--> v1
v8 --"p:qualifier/P582"--> v3
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c15 --"wikibase:language"--> c17
end
bind4[/"sample(?nato)"/]
v2 --o bind4
bind4 --as--o v10
bind5[/"sample(?morte)"/]
v4 --o bind5
bind5 --as--o v11