query-7bd8386802b56a3a8f49b8a2f443430d
Date data questionOn project chat right now is a question "For different date values with precision=9 (year), the value for month and day is variable. For instance, date of death (P570) for Yves Goldenberg (Q12743958) has the month and day as 0, while for Gheorghe Petrașcu (Q3595783) the month and day are 1...." 22:44, 25 April 2018 (UTC)) talk (TagishsimonI've been trying without success to see exactly what we store in the way of P570 for the two items. I'm guessing we should see a +1973-10-10T00:00:00Z/11 style date somewhere, and/or be able to get the precision value. Grateful if someone'd take pity on me, and provide a report that delves down & shows detail in this area. Starter for ten below. thx --
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 bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?DoD ?DoD2
WHERE
{
values ?item {wd:Q12743958 wd:Q3595783}
?item wdt:P570 ?DoD.
bind(xsd:date(?DoD) as ?DoD2)
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?DoD"):::projected
v3("?DoD2"):::projected
v1("?item"):::projected
c3(["bd:serviceParam"]):::iri
c5(["#91;AUTO_LANGUAGE#93;,en"]):::literal
bind0[/VALUES ?item/]
bind0-->v1
bind00(["wd:Q12743958"])
bind00 --> bind0
bind01(["wd:Q3595783"])
bind01 --> bind0
v1 --"wdt:P570"--> v2
bind1[/"http://www.w3.org/2001/XMLSchema#date(?DoD)"/]
v2 --o bind1
bind1 --as--o v3
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c3 --"wikibase:language"--> c5
end