Retrieving data from blank nodes in Wikidata

Viewed 1211

I am attempting to retrieve data about the lifespans of certain people. This is problematic in cases of people that have lived a while ago. The dataset for e.g. Pythagoras seems to have a so called "blank node" for date of birth (P569). But this blank node references another node earliest date (P1319) which has data I could work with just fine.

But for some reason I am not able to retrieve that node. My first try looked like this, but somehow that results in a completly empty result set:

SELECT DISTINCT ?person ?name ?dateofbirth ?earliestdateofbirth WHERE {
  ?person wdt:P31 wd:Q5.         # This thing is Human
  ?person rdfs:label ?name.      # Name for better conformation
  ?person wdt:P569 ?dateofbirth. # Birthday may result in a blank node
  ?dateofbirth wdt:P1319 ?earliestdateofbirth # Problem: Plausbible Birth
}

I then found another Syntax that suggested using ?person wdt:P569/wdt:P1319 ?earliestdateofbirth as some kind of "shortcut"-syntax for the explicit navigation I did above but this also ends with a empty result set.

SELECT DISTINCT ?person ?name ?dateofbirth ?earliestdateofbirth WHERE {
  ?person wdt:P31 wd:Q5.         # Is Human
  ?person rdfs:label ?name.      # Name for better conformation
  ?person wdt:P569/wdt:P1319 ?earliestdateofbirth. 
}

So how do I access a node referenced by a blank node (in my case specifically the earliest birthdate) in Wikidata?

1 Answers
Related