我想按姓名获取某人的生日,但不能重复。
我在这里看到它们是由于日期格式不同:03
和3
。
但是我不知道该如何忽略它,尝试了select distinct
,但没有帮助。
PREFIX dbo: <http://dbpedia.org/ontology/>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
select distinct ?person ?birthDate
where {
?person foaf:name "Julius Caesar"@en.
?person a foaf:Person.
?person dbo:birthDate ?birthDate
}
这就是我得到的:
person birthDate
1 http://dbpedia.org/resource/Julius_Caesar "-100-07-13"^^xsd:date
2 http://dbpedia.org/resource/Julius_Caesar "-100-7-13"^^xsd:date
3 http://dbpedia.org/resource/Julius_Caesar_(cricketer) "1830-03-25"^^xsd:date
4 http://dbpedia.org/resource/Julius_Caesar_(cricketer) "1830-3-25"^^xsd:date
5 http://dbpedia.org/resource/Julius_Caesar_(judge) "1557-1-1"^^xsd:date
当我只需要3个结果而不是5个结果时。