SELECT DISTINCT ?uri WHERE { ?x <http://dbpedia.org/property/debutteam> <http://dbpedia.org/resource/New_York_Yankees> . ?x <http://dbpedia.org/ontology/team> ?uri . }
List all the teams which have someone who played their first game for the Yankees?
SELECT DISTINCT ?v WHERE { ?c property:debutteam resource:New_York_Yankees . ?c property:team ?v . }
Cleveland Indians, New York Yankees, San Francisco Giants
The teams of the players whose debut team was the New York Yankees are [Cleveland Indians, New York Yankees, San Francisco Giants].
Teams of players whose debut team was the New York Yankees [Cleveland Indians, New York Yankees, San Francisco Giants].