query-e88c9674b746230a018fe6e63b5327dd

rq turtle/ttl

Historical figure with the most ancient known birth date 11:29, 22 September 2023 (UTC)) talk (NungalpiriggalHello, I would like to query which is the historical figure with the most ancient birth date. For example, Alexander the Great (Q8409) was born on 20 July 356 BCE, but are there any other instance of human born earlier about whom we know the exact birth date? Iteration by iteration, I've managed (with ChatGPT) to get a query which gives the result (sometimes, when not still times out):

Use at

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 psv: <http://www.wikidata.org/prop/statement/value/>
PREFIX p: <http://www.wikidata.org/prop/>
SELECT ?person ?dateOfBirth
WHERE {
  ?person wdt:P31 wd:Q5.  # Выбираем только элементы, которые являются людьми
  ?person wdt:P569 ?dateOfBirth.  # Получаем дату рождения
  FILTER (?dateOfBirth <= "-1000-01-01T00:00:00Z"^^xsd:dateTime).
  ?person p:P569/psv:P569 [wikibase:timePrecision "9"^^xsd:integer].  # Фильтруем по уровню точности "год"
}
ORDER BY ASC(?dateOfBirth)
LIMIT 10  # Ограничиваем количество результатов до 10 элементов

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?dateOfBirth"):::projected v2("?person"):::projected a2((" ")) a1((" ")) c3(["wd:Q5"]):::iri c6(["9^^xsd:integer"]):::literal f0[["?dateOfBirth <= '-1000-01-01T00:00:00Z^^xsd:dateTime'"]] f0 --> v1 v2 --"p:direct/P31"--> c3 v2 --"p:direct/P569"--> v1 a1 --"wikibase:timePrecision"--> c6 v2 --"p:P569"--> a2 a2 --"p:statement/value/P569"--> a1