SELECT DISTINCT ?uri WHERE { ?x <http://dbpedia.org/property/children> <http://dbpedia.org/resource/Sanjay_Gandhi> . ?x <http://dbpedia.org/ontology/party> ?uri . ?x <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://dbpedia.org/ontology/OfficeHolder>}
What is the party of the politicians whose children is Sanjay Gandhi ?
SELECT DISTINCT ?c WHERE { ?k property:party ?c . ?k rdf:type ontology:Office_Holder . ?k property:children resource:Sanjay_Gandhi }
Indian National Congress
The party of the politicians whose child is Sanjay Gandhi is [Indian National Congress].
The party of politicians whose child is Sanjay Gandhi is the [Indian National Congress].
[Indian National Congress] is the party of the office holder whose child is him .
[The Indian National Congress] is the office holder party whose child he is.