【发布时间】:2019-04-11 08:24:44
【问题描述】:
这是示例查询:
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX ns: <http://example.org/ns#>
SELECT ?title (?p AS ?fullPrice) (?fullPrice*(1-?discount) AS ?customerPrice)
WHERE {
?x ns:price ?p .
?x dc:title ?title .
?x ns:discount ?discount
}
结果将是:
| title | fullPrice | customerPrice |
| "The Semantic Web" | 23 | 17.25 |
| "SPARQL Tutorial" | 42 | 33.6 |
我只想显示 customerPrice > 20。
我在查询结束时尝试了HAVING (?customerPrice > 20),但似乎没有看到投影表达式。
还有其他方法吗?
【问题讨论】:
标签: sparql rdf triplestore