logo-header

 
 

 syntax

definition

  1. count(a) results in an uint32 parameter with the number of non null values of attribute a.
  2. count(a, relation) results in a an uint32 attribute with the number of non null values of attribute a, grouped by the relation attribute. The domain unit of the resulting attribute is the values unit of the relation attribute.

applies to

Attribute a with Numeric or Point value type
Relation attribute with value type of the group CanBeDomainUnit

conditions

The domain of argument a and relation must match.

since version

5.15

example

parameter<uint32> countNrInh := count(City/NrInhabitants); result = 6
attribute<uint32> countNrInhRegion (Region) :=
count(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

countNrInhRegion
1
2
1
1
0
domain Region, nr of rows = 5

see also


OBJECT VISION BV
Vrije Universiteit
De Boelelaan 1085
1081 HV Amsterdam
The Netherlands

tel: +31 (0)20 598 9083
fax:+31 (0)20 598 9904