areSame

areSame, aggregator

def process areSame(value: any): boolean

The aggregator returns true either if 1. any pair of elements a and b of a group satifies the equality a == b or 2. the group is empty. Otherwise, it returns false.

Examples

table T = with
  [| as A, as B |]
  [| 1,   "a"   |]
  [| 1,   "a"   |]
  [| 2,   "b"   |]
  [| 3,   "b"   |]
  [| 4,   "c"   |]

table G[gdim] = by T.B

where T.B != "c"
  show table "" a1b4 with
    gdim
    areSame(T.A)
    group by gdim

The above code results in the following table:

gdim areSame(T.A)
a True
b False
c True

Since "c" is filtered out by where T.B != "c", areSame(T.A) returns true for this group.

See also

User Contributed Notes
0 notes + add a note