是否可以在SPARQL CONSTRUCT查询中使用聚合?如果是,怎么样?
我有以下(简化)查询有效:
CONSTRUCT {
?s ei:number ?number .
}
FROM <http://example.org>
WHERE {
?s ei:number ?number
}
但是,由于?number
有多个解决方案,我想计算聚合。我试过这样的话:
CONSTRUCT {
?s ei:number AVG(?number) .
}
FROM <http://example.org>
WHERE {
?s ei:number ?number
}
SPARQL Query Validator引发了以下错误:
Encountered " "avg" "AVG "" at line 3, column 14.
Was expecting one of:
...
...
...
...
...
...
"true" ...
"false" ...
...
...
...
...
...
...
...
...
...
...
...
...
...
"(" ...
...
"[" ...
...
因此,我的问题是:(如何)我可以在SPARQL CONSTRUCT查询中使用聚合?