Returns the most frequent value in each group. Ties are resolved by the
canonical ordering.
value: values to aggregate.
Examples
table T = with
[| as Group, as Value |]
[| "A", "x" |]
[| "A", "x" |]
[| "A", "y" |]
[| "B", "y" |]
[| "B", "z" |]
table G[g] = by T.Group
G.Mode = mode(T.Value)
show table "Mode" with
g as "Group"
G.Mode as "Mode"
This produces the following table:
Group
Mode
A
x
B
y
Remarks
Empty groups return the default value for the data type.