Skip to main content

avg

avg returns the average of all the entries in a column which are not unbound and can only be used with numeric data.

Parameter

Type

Description

value

decimal, double

The values to be averaged (unbound values are ignored)

Returns: decimal

Example

Query:

PREFIX : <https://ddw-doccorp.linked.data.world/d/sparql-aggregation-sample-queries/>
PREFIX agg: <http://data.world/function/aggregate#>

SELECT (agg:avg(?foo) AS ?max)
{
    [ :col-aggregations-foo ?foo ]
}

Run query

Result:

avg

17.8333