I am using virtuoso 7.2.1 and i am trying to run a sparql query between 3 graphs.
G1 contains:
@prefix : <http://test#> .
:bob :hasAddress :add1 .
G2 contains:
@prefix : <http://test#> .
:bob :hasAddress :add2 .
and G3 contains:
@prefix : <http://test#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
:add1 owl:sameAs :add2 .
The sparql i'm trying to run in virtuoso is:
DEFINE input:same-as "yes"
Select *
from <http://G1>
from <http://G3>
Where{
<http://test#bob> <http://test#hasAddress> ?z .
}
result:
<http://test#add1>
expected result:
<http://test#add1>
<http://test#add2>
Note: If i use a single graph(G1,G2,G3 merged to G graph) i get the expected result. Why this doesnt work with multiple graphs. Thanks.
-----------------------------------EDIT--------------
Respectively this query:
DEFINE input:same-as "yes"
Select *
from <http://G2>
from <http://G3>
Where{
<http://test#bob> <http://test#hasAddress> ?z .
}
or this query:
DEFINE input:same-as "yes"
Select ?z
from named <http://G2>
from named <http://G3>
Where{
graph ?g {<http://test#bob> <http://test#hasAddress> ?z .}
}
has only this result:
<http://test#add2>