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.

Returns: decimal

Table 1.

Parameter

Type

Description

value

decimal, double

The values to be averaged (unbound values are ignored)



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 ]
}

Try the query

Table 1. Results

avg

17.8333