-
Notifications
You must be signed in to change notification settings - Fork 1
Unique
mtbeek32 edited this page Jan 31, 2024
·
10 revisions
Relational functions unique
- unique(a)
unique(a) results in a new uint32 domain unit with the unique occurences of attribute a.
The unique function generates a subitem, named Values. This data item contains the unique occurences of attribute a, sorted ascending.
The Values data item can be used in a lookup (in case attribute a is a relation) or a rjoin function, to relate attributes to the new domain unit, see the example.
- attribute a with Numeric, Point, uint2, uint4, bool or string value type
unit<uint32> Region := unique(City/RegionCode)
{
attribute<string> name := rjoin(Values, City/RegionCode, City/RegionName);
}
City/RegionCode | City/RegionName |
---|---|
100 | Noord Holland |
200 | Zuid Holland |
300 | Utrecht |
200 | Zuid Holland |
400 | Noord Brabant |
null | null |
400 | null |
domain City, nr of rows = 7
Region/Values | Region/name |
---|---|
100 | Noord Holland |
200 | Zuid Holland |
300 | Utrecht |
400 | Noord Brabant |
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.