dbpedia sparql获取特定国籍的所有足球运动员的所有职业信息

时间:2019-02-23 19:24:30

标签: sparql dbpedia

我正在尝试从dbpedia进行完美的sparql查询,以获取特定出生国家/地区的所有足球运动员的职业信息,例如:

birthCountry | player | birthDate | year | team | matches | goals 

目前,我设法执行了无法满足我需求的查询

select ?birthCountry ?player ?birthDate ?year ?team ?matches ?goals where {
  ?player a dbo:SoccerPlayer ; 
            dbo:birthPlace/dbo:country ?birthCountry ;
            dbo:birthDate ?birthDate ;
            dbo:careerStation ?station .
  ?station dbo:years ?year ;
           dbo:team/rdfs:label ?team ;
           dbo:numberOfMatches ?matches ;
           dbo:numberOfGoals ?goals .
  filter (langMatches(lang(?team), "EN"))
  filter (?birthCountry in (dbr:England))
}
order by ?player ?year

问题是由于某些我不理解的出生日期格式,我得到了副本:

birthCountry    | player            | birthDate              | year              | team                     | matches | goals
-----------------------------------------------------------------------------------------------------------------------------
:England [http] | :AJ_George [http] | "1996-12-06"^^xsd:date | "2014"^^xsd:gYear | "Banbury United F.C."@en | 4       | 0
:England [http] | :AJ_George [http] | "1996-12-6"^^xsd:date  | "2014"^^xsd:gYear | "Banbury United F.C."@en | 4       | 0
:England [http] | :AJ_George [http] | "1996-12-06"^^xsd:date | "2014"^^xsd:gYear | "Oxford United F.C."@en  | 2       | 0
:England [http] | :AJ_George [http] | "1996-12-6"^^xsd:date  | "2014"^^xsd:gYear | "Oxford United F.C."@en  | 2       | 0

预先感谢您的帮助!

0 个答案:

没有答案