SELECT DISTINCT ?uri WHERE { ?x <http://dbpedia.org/ontology/operator> <http://dbpedia.org/resource/Budapest> . ?x <http://dbpedia.org/ontology/operator> ?uri . ?x <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://dbpedia.org/ontology/Train>}
List all the operators of the train who operates in Budapest ?
SELECT DISTINCT ?y WHERE { ?n property:operator ?y . ?n property:operator resource:Budapest . ?n rdf:type ontology:Train }
Budapest, Hungary, BKV Zrt.
The operators of the train which operate in Budapest are [Budapest, Hungary, BKV Zrt.].
The train drivers operating in Budapest are [Budapest, Hungary, BZZ].