query-e89593db38bd199d157686adccf5fac6
title:Morti recenti SELECT ?q ?qLabel (YEAR(?died) as ?ydied) (MONTH(?died) as ?mdied) (DAY(?died) as ?ddied) ?pdied (YEAR(?born) as ?yborn) (MONTH(?born) as ?mborn) (DAY(?born) as ?dborn) ?pborn ?qDescription ?podLabel ?pod ?podnazioneLabel ?pobLabel ?pob ?pobnazioneLabel ?pusc WHERE { ?q wdt:P5739 ?pusc ; p:P570/psv:P570 [ wikibase:timePrecision ?pdied ; wikibase:timeValue ?died ] .
OPTIONAL { ?q wdt:P20 ?pod . ?pod wdt:P17 ?podnazione . } OPTIONAL { ?q p:P569/psv:P569 [ wikibase:timePrecision ?pborn ; wikibase:timeValue ?born ] . } OPTIONAL { ?q wdt:P19 ?pob . ?pob wdt:P17 ?pobnazione . }
BIND (NOW() - "P3M"^^xsd:duration AS ?month_ago) FILTER (?died >= ?month_ago && ?died < NOW()) SERVICE wikibase:label { bd:serviceParam wikibase:language "it". } } ORDER BY ?died
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 psv: <http://www.wikidata.org/prop/statement/value/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#title:Morti recenti
SELECT ?q ?qLabel
(YEAR(?died) as ?ydied) (MONTH(?died) as ?mdied) (DAY(?died) as ?ddied) ?pdied
(YEAR(?born) as ?yborn) (MONTH(?born) as ?mborn) (DAY(?born) as ?dborn) ?pborn
?qDescription ?podLabel ?pod ?podnazioneLabel ?pobLabel ?pob ?pobnazioneLabel ?pusc
WHERE {
?q wdt:P5739 ?pusc ; p:P570/psv:P570 [ wikibase:timePrecision ?pdied ; wikibase:timeValue ?died ] .
OPTIONAL { ?q wdt:P20 ?pod . ?pod wdt:P17 ?podnazione . }
OPTIONAL { ?q p:P569/psv:P569 [ wikibase:timePrecision ?pborn ; wikibase:timeValue ?born ] . }
OPTIONAL { ?q wdt:P19 ?pob . ?pob wdt:P17 ?pobnazione . }
BIND (NOW() - "P3M"^^xsd:duration AS ?month_ago)
FILTER (?died >= ?month_ago && ?died < NOW())
SERVICE wikibase:label { bd:serviceParam wikibase:language "it". }
}
ORDER BY ?died
Query found at
- https://www.wikidata.org/wiki/User:Ep%C3%ACdosis/Queries
- https://www.wikidata.org/wiki/User:Ep%C3%ACdosis/sandbox