我有一个SPARQL查询,我想在其中选择所有不流经密西西比州或纽约州的河流。第一个很好,但第二个选择所有河流。有人可以解释为什么
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT ?y ?k
WHERE
{
?y owl:flow_through ?k
MINUS
{
{?y owl:flow_through <file://c/fakepath/geo.owl#Newyork_state>}
UNION
{?y owl:flow_through <file://c/fakepath/geo.owl#Mississippi_state>}
}
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT ?y ?k
WHERE
{
?y owl:flow_through ?k
MINUS
{
FILTER (?k IN (<file://c/fakepath/geo.owl#Newyork_state>,
<file://c/fakepath/geo.owl#Alaska_state>))
}
}