Repository navigation
Count
cicada edited this page Dec 7, 2022
·
9 revisions
Aggregation functions count
- count(a)
- count(a, relation)
- count(a) results in an uint32 parameter with the number of non null values of attribute a.
- count(a, relation) results in a an uint32 attribute with the number of non null values of attribute a, grouped by relation. The domain unit of the resulting attribute is the values unit of the relation.
- attribute a with Numeric or Point value type
- relation with value type of the group CanBeDomainUnit
The domain of arguments a and relation must match.
5.15
parameter countNrInh := count(City/NrInhabitants); result = 6
attribute 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
GeoDMS ©Object Vision BV. Source code distributed under GNU GPL-3. Documentation distributed under CC BY-SA 4.0.