Help SPARQL

Dear SPARQL Developers 
I need to a SPARQL comment that with it I extract Subjects along with their Predicates and Objects which the Subject at least 
have one sameAs Predicate. 
for example suppose I have below triples: 

A knows X1 
A friendof X2 
A sameAs X3 
B knows X4 
B familarBy X5 

I need to a SPARQL comment that extract bellow triples, because A has sameAs predicate 
A knows X1 
A friendof X2 
A sameAs X3 

How can I write such SPARQL 
Best Wishes 
Reza 

Received on Sunday, 22 April 2012 06:05:48 UTC