I have the following sample KB:
(:Ethan, :rel1, :Peter)
(:Ethan, :rel2, :son)
(:Sienna, :rel3, :Josie)
(:Sienna, :rel4, :daughter)
(:Josie, :rel5, :Peter)
(:Josie, :rel6, :wife)
Now I need to find a property path (all related triples) from :son to :wife. What would be the SPARQL query for that?
The result should be like this:
(:Ethan, :rel2, :son)
(:Ethan, :rel1, :Peter)
(:Josie, :rel5, :Peter)
(:Josie, :rel6, :wife)