Wikidata:Contact the development team/Query Service and search/Archive/2020/07

This page is an archive. Please do not modify it. Use the current page, even to continue an old discussion.

Year (July 15)

I was looking for a list of all years from 1800 - 2100. They bolow query should do the trick:

SELECT *
WHERE {
  ?year wdt:P31 wd:Q577 ;
        wdt:P585 ?point_of_time .
  FILTER (?point_of_time >= "1800-00-01T00:00:00"^^xsd:dateTime &&
          ?point_of_time <= "2100-12-31T00:00:00"^^xsd:dateTime)
}
ORDER BY ?point_of_time
Try it!


By inspecting the values returned, it seems some years, like 1904 are not present. Is this an error in my query, or something else? From the wikidata page for the year 1903 ([1](https://www.wikidata.org/wiki/Q2045)), a reference called "followed by" exist for the year 1904 ([2](https://www.wikidata.org/wiki/Q2046)). I am just wondering why it is not returned as part of the query. This is also the case for multiple other years from the period 1800 - 2100.

Hi, this is not a case for the development team. If you look at the item 1904 (Q2046), you will see that it has the statement instance of (P31) calendar year (Q3186692), but not instance of (P31) year (Q577) which your query is looking for. So this is a case of inconsistent use of P31 for years. --Dipsacus fullonum (talk) 11:42, 15 July 2020 (UTC)