Q:

Figuring out the right SPARQL query

I am trying to somehow find all the owl:sameAs properties from a resource link. A simple query would be like 
SELECT ?x WHERE {
  <http://dbpedia.org/resource/Tetris>  owl:sameAs ?x
}

However i also would like to get the Yago link mentioned as is owl:sameAs  of. Could any one help me out how to do this ? 

A:

You can get the YAGO link like so:
SELECT ?x WHERE {
  ?x owl:sameAs <http://dbpedia.org/resource/Tetris>
}

Or get both the “incoming” and “outgoing” links in one query:
SELECT ?x WHERE {
  { <http://dbpedia.org/resource/Tetris>  owl:sameAs ?x }
  UNION
  { ?x owl:sameAs <http://dbpedia.org/resource/Tetris> }
}

