query-26a32db60690bade691c56a4a9daa87c
Date di nascita, a volte anche di morte, inesistentiBuon pomeriggio! Volevo dirti che ho appena scoperto un problema piuttosto grave con alcuni elementi di autori BEIC che sono stati importati negli anni passati. La seguente query mostra tutti gli autori che sembrano essere morti esattamente a 70 anni (ben 751 in questo momento):
Use at
- https://query.wikidata.org/sparql
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/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?item ?itemLabel ?db ?dd
WHERE {
?item wdt:P1343 wd:Q51955019 .
?item p:P569/psv:P569 ?dbn .
?item p:P570/psv:P570 ?ddn .
?dbn wikibase:timeValue ?db .
?ddn wikibase:timeValue ?dd .
FILTER( ?age = 70 )
BIND( year(?dd) - year(?db) - if(month(?dd)<month(?db) || (month(?dd)=month(?db) && day(?dd)<day(?db)),1,0) as ?age )
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY ?db ?dd
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v7("?age")
v1("?db"):::projected
v5("?dbn")
v2("?dd"):::projected
v6("?ddn")
v4("?item"):::projected
a1((" "))
a2((" "))
c3(["wd:Q51955019"]):::iri
c10(["bd:serviceParam"]):::iri
c12(["#91;AUTO_LANGUAGE#93;,en"]):::literal
f0[["?age = '70^^xsd:integer'"]]
f0 --> v7
v4 --"p:direct/P1343"--> c3
v4 --"p:P569"--> a1
a1 --"p:statement/value/P569"--> v5
v4 --"p:P570"--> a2
a2 --"p:statement/value/P570"--> v6
v5 --"wikibase:timeValue"--> v1
v6 --"wikibase:timeValue"--> v2
bind1[/"year-from-dateTime(?dd) - year-from-dateTime(?db) - if((month-from-dateTime(?dd) < month-from-dateTime(?db) || month-from-dateTime(?dd) = month-from-dateTime(?db)day-from-dateTime(?dd) < day-from-dateTime(?db)),'1^^xsd:integer','0^^xsd:integer')"/]
v2 --o bind1
v1 --o bind1
bind1 --as--o v7
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c10 --"wikibase:language"--> c12
end