Filter sparql过滤器赢得';行不通

Filter sparql过滤器赢得';行不通,filter,sparql,rdf,dbpedia,Filter,Sparql,Rdf,Dbpedia,我想从一家足球俱乐部招募所有球员,并过滤掉那些来自德国的球员,我知道不使用过滤选项是可能的,但我是SPARQL的新手,似乎我不知道在这种情况下如何使用过滤选项,所以如果有人能告诉我如何使用过滤选项,我会很高兴 SELECT distinct ?player WHERE { ?player a <http://dbpedia.org/ontology/SoccerPlayer>. ?player <http://dbpedia.org/property/currentclub&

我想从一家足球俱乐部招募所有球员,并过滤掉那些来自德国的球员,我知道不使用过滤选项是可能的,但我是SPARQL的新手,似乎我不知道在这种情况下如何使用过滤选项,所以如果有人能告诉我如何使用过滤选项,我会很高兴

SELECT distinct ?player WHERE {
?player a <http://dbpedia.org/ontology/SoccerPlayer>. 
?player <http://dbpedia.org/property/currentclub> <http://dbpedia.org/resource/Hertha_BSC>. 
optional {?subject <http://dbpedia.org/ontology/birthPlace>/<http://dbpedia.org/ontology/country> ?<http://dbpedia.org/resource/Germany>. }
filter (!bound(?subject)).
} 
ORDER BY ASC(?player)
选择distinct?播放器在哪里{
?玩家a。
?玩家。
可选{?主题/?。}
过滤器(!绑定(?主题))。
} 
ASC订购(?玩家)

向阿德里安问好

我希望你正在寻找这样的东西:

SELECT distinct ?player WHERE {
    ?player a dbo:SoccerPlayer . 
    ?player dbp:currentclub dbr:Hertha_BSC . 
    ?player dbo:birthPlace/dbo:country? ?country .
    FILTER (?country = dbr:Germany)
    } 
ORDER BY ASC(?player)
或者这个:

SELECT distinct ?player WHERE {
    ?player a dbo:SoccerPlayer . 
    ?player dbp:currentclub dbr:Hertha_BSC . 
    ?player dbo:birthPlace/dbo:country? ?country .
    FILTER (?country in (dbr:Germany))
    } 
ORDER BY ASC(?player)
甚至这个:

SELECT distinct ?player WHERE {
    ?player a dbo:SoccerPlayer . 
    ?player dbp:currentclub ?club . 
    ?player dbo:birthPlace/dbo:country? ?country .
    VALUES (?club ?country) { (dbr:Hertha_BSC dbr:Germany) }
    } 
ORDER BY ASC(?player)

我希望你正在寻找这样的东西:

SELECT distinct ?player WHERE {
    ?player a dbo:SoccerPlayer . 
    ?player dbp:currentclub dbr:Hertha_BSC . 
    ?player dbo:birthPlace/dbo:country? ?country .
    FILTER (?country = dbr:Germany)
    } 
ORDER BY ASC(?player)
或者这个:

SELECT distinct ?player WHERE {
    ?player a dbo:SoccerPlayer . 
    ?player dbp:currentclub dbr:Hertha_BSC . 
    ?player dbo:birthPlace/dbo:country? ?country .
    FILTER (?country in (dbr:Germany))
    } 
ORDER BY ASC(?player)
甚至这个:

SELECT distinct ?player WHERE {
    ?player a dbo:SoccerPlayer . 
    ?player dbp:currentclub ?club . 
    ?player dbo:birthPlace/dbo:country? ?country .
    VALUES (?club ?country) { (dbr:Hertha_BSC dbr:Germany) }
    } 
ORDER BY ASC(?player)

见下面我的答案。它是重复的,也就是说,我可能会删除它,但在回答中描述事情比在评论中更容易。请解释为什么你不想使用前面的答案,因为它符合你的要求,请参阅下面我的答案。它是重复的,也就是说,我可能会删除它,但在回答中描述事情比在评论中更容易。请解释为什么你不想使用前面的答案,因为它符合你的要求完美那正是我想要的。完美那正是我想要的。