Skip to content

Select_data

mtbeek32 edited this page Jan 26, 2023 · 15 revisions

Relational functions select_data

syntax

definition

The select_data(domain unit, condition, attribute) function results relates the attribute argument to the domain unit argument, based on the condition argument.

The select_data is mostly used together with the select_many function.

applies to

  • unit domain unit with value type uint32
  • condition must be a boolean attribute or subexpression resulting in boolean values.
  • attribute: an attribute that must have matching value type and metric with the resulting attribute.

since version

7.305

example

unit<uint32> ZHCities := select_many(City, City/RegionCode == 200)
{
   attribute<string> name := 
      select_data(., City/RegionCode == 200, CityLabels/Name);
}
City/RegionCode City/Name
100 Amsterdam
200 Rotterdam
300 Utrecht
200 Den Haag
400 Eindhoven
null Haarlem
400 Tilburg

domain City, nr of rows = 7

ZHCities/name
Rotterdam
Den Haag

domain ZHCities, nr of rows = 2

see also

Clone this wiki locally