【发布时间】:2016-07-20 18:54:41
【问题描述】:
我写了这个查询并返回夫妇和特定条件的列表。 (在http://live.dbpedia.org/sparql)
SELECT DISTINCT ?actor ?person2 ?cnt
WHERE
{
{
select DISTINCT ?actor ?person2 (count (?film) as ?cnt)
where {
?film dbo:starring ?actor .
?actor dbo:spouse ?person2.
?film dbo:starring ?person2.
}
order by ?actor
}
FILTER (?cnt >9)
}
问题是某些行是重复的。 示例:
http://dbpedia.org/resource/George_Burnshttp://dbpedia.org/resource/Gracie_Allen12
http://dbpedia.org/resource/Gracie_Allenhttp://dbpedia.org/resource/George_Burns12
如何删除这些重复? 我在 ?actor 中添加了性别,但它会损坏当前结果。
【问题讨论】: