What is {series ordinal} of {Mars} that is {of} is {inner planet} ?
What Mars series ordinal is an inner planet?
What is series ordinal of Mars that is inner planet ?
SELECT ?u WHERE { resource:Mars property:series_ordinal ?t . ?t property:series_ordinal ?u . ?t property:of resource:inner_planet }
select distinct ?obj  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q111> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P1545> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> ?obj .
?statement <http://www.wikidata.org/entity/P642> <http://wikidata.dbpedia.org/resource/Q3504248>
} 

SELECT ?obj WHERE { wd:Q111 p:P1545 ?s . ?s ps:P1545 ?obj . ?s pq:P642 wd:Q3504248 }