Mean

From ObjectVision

Jump to: navigation, search

Aggregation functions mean

Contents

syntax

  • mean(a)
  • mean(a, relation)

definition

applies to

conditions

  1. The values unit of the resulting data item should match with regard to value type and metric with the values unit of attribute a.
  2. The domain of argument a and relation must match.

since version

5.15

example

parameter<uint32> meanNrInh                           := mean(City/NrInhabitants); result = 375
attribute<uint32>    meanNrInhRegion (Region) := mean(City/NrInhabitants, City/Region_rel);
City/NrInhabitants City/Region_rel
550 0
525 1
300 2
500 1
200 3
175 null
null 3

domain City, nr of rows = 7

meanNrInhRegion
550
512.5
300
200
null

domain Region, nr of rows = 5

Personal tools