SELECT DISTINCT ?uri WHERE { ?x <http://dbpedia.org/ontology/riverMouth> <http://dbpedia.org/resource/Caspian_Sea> . ?x <http://dbpedia.org/ontology/sourceCountry> ?uri . ?x <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://dbpedia.org/ontology/River>}
Rivers from which countries flow into the Caspian?
SELECT DISTINCT ?z WHERE { ?n property:source_country ?z . ?n rdf:type ontology:River . ?n property:river_mouth resource:Caspian_Sea }
Kazakhstan, Russia, Turkey, Stavropol Krai, North Ossetia-Alania, Chechnya, Kabardino-Balkaria, Dagestan, Georgia (country), Iran, Azerbaijan, Astrakhan Oblast
The source countries of the rivers that flow into the Caspian are [Kazakhstan, Russia, Turkey, Stavropol Krai, North Ossetia-Alania, Chechnya, Kabardino-Balkaria, Dagestan, Georgia (country), Iran, Azerbaijan, Astrakhan Oblast].
Rivers flowing into the Caspian Sea are [Kazakhstan, Russia, Turkey, Stavropol Krai, North Ossetia-Alania, Chechnya, Kabardino-Balkaria, Dagestan, Georgia (country), Iran, Azerbajan, and Astrakhan Oblast].