Is it possible to access values of an item which exists in the property of another item. For example in the case of the Matterhorn. There is a property 'significant event' P793. This property's value is the item 'first ascent' Q1194369 which has the properties 'point in time' P585 and 'participant' P710.
I would like to be able to be able to return these values for the mountain but I do not know how to access the values using SPARQL. I have tried defining 'first ascent' as a parameter but it does not yield any results. I have also tried examining all of the available properties of the 'first ascent' but I cannot see where these values are stored. The code I have tried is:
SELECT ?mountainLabel ?date ?climbers
WHERE
{
?mountain wdt:P31 wd:Q8502. # instance of mountain
?mountain wdt:P17 wd:Q39. # country Switzerland
?mountain wdt:P935 "Matterhorn". # name
?mountain wdt:P793/wd:Q1194369* ?firstAss. # first ascent
?firstAss wdt:P585 ?date . #date of ascent
?firstAss wdt:P710 ?climbers . #climbername
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en, de". }
}