logo-header

 
 

last

syntax

definition

  1. last(a) results in a parameter with the last of the non null values of attribute a.
  2. last(a, partioning) results in an attribute with the last of the non null values of attribute a, grouped by the partitiong attribute. The domain unit of the resulting attribute is the values unit of the partioning attribute.
The values unit of the resulting data item should match with regard to value type and metric with the values unit of attribute a.

applies to

Attribute with value types:

  • groups: Numeric, Point
  • string
  • bool

conditions

Attributes a and partioning need to match with regard to their domain unit.

since version

5.15

example

1. parameter<uint32> lastNrInh:
expr = "last(City/NrInhabitants)"; result = 175
2. parameter<string> lastCityName:
expr = "last(City/CityName)"; result = ‘Haarlem’ 
3. parameter<bool> lastIsCapital:
expr = "last(City/IsCapital)"; result = False
4. attribute<uint32> lastNrInhRegion   (RegionDomain):
expr = "last(City/NrInhabitants, City/RegionNr)";
5. attribute<string> lastCityNameRegion (RegionDomain):
expr = "last(City/CityName, City/RegionNr)";
6. attribute<bool> lastIsCapital (RegionDomain):
expr = "last(City/IsCapital, City/RegionNr)";

 

City/NrInhabitants City/CityName IsCapital City/RegionNr
550 Amsterdam True 0
525 Rotterdam False 1
300 Utrecht False 2
500 DenHaag False 1
200 Eindhoven False 3
175 Haarlem False null
null null False 3

Table CityDomain, nr of rows = 7

lastNrInhRegion lastCityNameRegion lastIsCapitalRegion
550 Amsterdam True
500 DenHaag False
300 Utrecht False
200 Eindhoven False
null null False

Table RegionDomain, nr of rows = 5


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



Recent Wiki Changes