Suppose we have three objects
account(id,name)
opportunity(id,amount,stage)
properties(id,address)
account object has one to many relationship to opportunity object and opportunity object has one to many relationship to properties object .
And we want SOQL query to display only name ,stage and address
id,name,amount,stage,address are fields in the objects.