What is {military rank} of {John Philip Sousa} that is {military branch} is {United States Navy} ?
What was the highest military rank John Philip Sousa achieved in the United States Navy?
What was John Philip Sousa's military rank in the US Navy?
SELECT ?k WHERE { resource:John_Philip_Sousa property:military_rank ?z . ?z property:military_branch resource:United_States_Navy . ?z property:military_rank ?k }
select distinct ?obj  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q295935> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P410> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> ?obj .
?statement <http://www.wikidata.org/entity/P241> <http://wikidata.dbpedia.org/resource/Q11220>
} 

SELECT ?obj WHERE { wd:Q295935 p:P410 ?s . ?s ps:P410 ?obj . ?s pq:P241 wd:Q11220 }