我做了一个查询,它显示了所有的项目,是“在分类”‘沙眼衣原体D/UW-3/CX’。这些项目必须具有属性P644 (基因组开始)和P645 (基因组端)。到目前为止这是可行的。但是我想根据“基因组开始”和“基因组结束”的值来过滤这些项目。在我的例子中,我想接收所有的项目,其中‘基因组开始’高于'100‘,’基因组端‘低于'3000’。但这不起作用。我不是用正确的方法使用过滤器吗?
下面是我直接在维基数据查询服务页面中的代码:维基数据查询服务
SELECT ?item ?genomic_start ?genomic_end
Where{
?item wdt:P703 wd:Q20800373. #P703:found in taxon
?item wdt:P644 ?genomic_start.
?item wdt:P645 ?genomic_end.
FILTER (?genomic_start > "100").
FILTER (?genomic_end < "3000").
}
发布于 2016-03-16 15:28:11
您需要首先将值转换为int,以便能够使用>或<:
SELECT ?item ?genomic_start ?genomic_end
Where{
?item wdt:P703 wd:Q20800373. #P703:found in taxon
?item wdt:P644 ?genomic_start.
?item wdt:P645 ?genomic_end.
FILTER (xsd:integer(?genomic_start) > 100).
FILTER (xsd:integer(?genomic_end) < 3000).
}
https://stackoverflow.com/questions/36037558
复制相似问题