@deephaven/jsapi-types
    Preparing search index...

    Class Last

    Returns the last value within each aggregation group.

    Hierarchy (View Summary)

    Index
    columns?: readonly (string | Column)[]

    The columns to aggregate, which can be renaming expressions such as "Out = In". Required and non-empty in aggBy. Ignored in aggAllBy.

    type: "Last"
    • Creates an absolute-sum aggregation.

      Parameters

      • Optionalcolumns: readonly (string | Column)[]

        the columns to aggregate, which can be renaming expressions such as "Out = In". Defaults to null, which is valid only in aggAllBy where it will be ignored.

      Returns AbsSum

      an aggregation

    • Creates an Approximate Percentile aggregation using T-Digest.

      Parameters

      • percentile: number

        the percentile to calculate, must be in the range [0.0, 1.0]

      • Optionalcompression: number

        T-Digest compression factor, which must be ≥ 1. Values above 1000 are not recommended. If null, the server chooses a default.

      • Optionalcolumns: readonly (string | Column)[]

        the columns to aggregate, which can be renaming expressions such as "Out = In". Defaults to null, which is valid only in aggAllBy where it will be ignored.

      Returns ApproxPercentile

      an aggregation

    • Creates an Average (arithmetic mean) aggregation.

      Parameters

      • Optionalcolumns: readonly (string | Column)[]

        the columns to aggregate, which can be renaming expressions such as "Out = In". Defaults to null, which is valid only in aggAllBy where it will be ignored.

      Returns Avg

      an aggregation

    • Creates a Count aggregation, counting the number of rows in each group. Not supported in aggAllBy.

      Parameters

      • col: string

        the output column name to hold the counts

      Returns Count

      an aggregation

    • Creates a Count Distinct aggregation, counting the number of distinct values in each group.

      Parameters

      • OptionalcountNulls: boolean

        whether null values should be counted as distinct values

      • Optionalcolumns: readonly (string | Column)[]

        the columns to aggregate, which can be renaming expressions such as "Out = In". Defaults to null, which is valid only in aggAllBy where it will be ignored.

      Returns CountDistinct

      an aggregation

    • Creates a CountWhere aggregation, counting rows that match the given filter(s) in each group. Not supported in aggAllBy.

      Parameters

      • col: string

        the output column name to hold the counts

      • filters: readonly string[]

        the filter expression(s) to apply before counting

      Returns CountWhere

      an aggregation

    • Creates a Distinct aggregation, collecting the distinct values within each group as arrays.

      Parameters

      • OptionalincludeNulls: boolean

        whether null values should be included in the distinct output values. Defaults to false.

      • Optionalcolumns: readonly (string | Column)[]

        the columns to aggregate, which can be renaming expressions such as "Out = In". Defaults to null, which is valid only in aggAllBy where it will be ignored.

      Returns Distinct

      an aggregation

    • Creates a First aggregation, returning the first value in each group.

      Parameters

      • Optionalcolumns: readonly (string | Column)[]

        the columns to aggregate, which can be renaming expressions such as "Out = In". Defaults to null, which is valid only in aggAllBy where it will be ignored.

      Returns First

      an aggregation

    • Creates a FirstRowKey aggregation, returning the row key of the first row in each group. Not supported in aggAllBy.

      Parameters

      • col: string

        the output column name to hold the first row key

      Returns FirstRowKey

      an aggregation

    • Creates a Formula aggregation, computing one output column per group from a formula such as "MaxW = max(W)". See Formula for what the column names in the expression stand for.

      Parameters

      • formula: string

        the output column's name and the expression that computes it, as "Out = expression"

      Returns Formula

      an aggregation

    • Creates a Freeze aggregation, which keeps the first value seen and ignores subsequent changes.

      Parameters

      • Optionalcolumns: readonly (string | Column)[]

        the columns to aggregate, which can be renaming expressions such as "Out = In". Defaults to null, which is valid only in aggAllBy where it will be ignored.

      Returns Freeze

      an aggregation

    • Creates a Group aggregation, collecting values into arrays.

      Parameters

      • Optionalcolumns: readonly (string | Column)[]

        the columns to aggregate, which can be renaming expressions such as "Out = In". Defaults to null, which is valid only in aggAllBy where it will be ignored.

      Returns Group

      an aggregation

    • Creates a Last aggregation, returning the last value in each group.

      Parameters

      • Optionalcolumns: readonly (string | Column)[]

        the columns to aggregate, which can be renaming expressions such as "Out = In". Defaults to null, which is valid only in aggAllBy where it will be ignored.

      Returns Last

      an aggregation

    • Creates a LastRowKey aggregation, returning the row key of the last row in each group. Not supported in aggAllBy.

      Parameters

      • col: string

        the output column name to hold the last row key

      Returns LastRowKey

      an aggregation

    • Creates a Max aggregation.

      Parameters

      • Optionalcolumns: readonly (string | Column)[]

        the columns to aggregate, which can be renaming expressions such as "Out = In". Defaults to null, which is valid only in aggAllBy where it will be ignored.

      Returns Max

      an aggregation

    • Creates a Median aggregation.

      Parameters

      • OptionalaverageEvenlyDivided: boolean

        when the group size is even, whether to average the two middle values. When true, averages the two middle values. When false, uses the larger value. Only int, long, float and double columns are averaged. Defaults to true.

      • Optionalcolumns: readonly (string | Column)[]

        the columns to aggregate, which can be renaming expressions such as "Out = In". Defaults to null, which is valid only in aggAllBy where it will be ignored.

      Returns Median

      an aggregation

    • Creates a Min aggregation.

      Parameters

      • Optionalcolumns: readonly (string | Column)[]

        the columns to aggregate, which can be renaming expressions such as "Out = In". Defaults to null, which is valid only in aggAllBy where it will be ignored.

      Returns Min

      an aggregation

    • Creates a Partition aggregation, splitting the table into sub-tables, one per group. Not supported in aggAllBy.

      Parameters

      • col: string

        the output column name to hold the sub-tables

      • OptionalincludeGroupByColumns: boolean

        whether to include the group-by columns in each sub-table. Defaults to true

      Returns Partition

      an aggregation

    • Creates a Percentile aggregation.

      Parameters

      • percentile: number

        the percentile to calculate, must be in the range [0.0, 1.0]

      • OptionalaverageEvenlyDivided: boolean

        whether to average the two boundary values when the percentile falls evenly between them. Only int, long, float and double columns are averaged. Defaults to false if not specified

      • Optionalcolumns: readonly (string | Column)[]

        the columns to aggregate, which can be renaming expressions such as "Out = In". Defaults to null, which is valid only in aggAllBy where it will be ignored.

      Returns Percentile

      an aggregation

    • Creates a SortedFirst aggregation, returning the first value when each group is sorted by the given columns.

      Parameters

      • sortedColumns: readonly (string | Column)[]

        the columns to sort by when determining the "first" row

      • Optionalcolumns: readonly (string | Column)[]

        the columns to aggregate, which can be renaming expressions such as "Out = In". Defaults to null, which is valid only in aggAllBy where it will be ignored.

      Returns SortedFirst

      an aggregation

    • Creates a SortedLast aggregation, returning the last value when each group is sorted by the given columns.

      Parameters

      • sortedColumns: readonly (string | Column)[]

        the columns to sort by when determining the "last" row

      • Optionalcolumns: readonly (string | Column)[]

        the columns to aggregate, which can be renaming expressions such as "Out = In". Defaults to null, which is valid only in aggAllBy where it will be ignored.

      Returns SortedLast

      an aggregation

    • Creates a Std (sample standard deviation) aggregation, computed using Bessel's correction.

      Parameters

      • Optionalcolumns: readonly (string | Column)[]

        the columns to aggregate, which can be renaming expressions such as "Out = In". Defaults to null, which is valid only in aggAllBy where it will be ignored.

      Returns Std

      an aggregation

    • Creates a Sum aggregation.

      Parameters

      • Optionalcolumns: readonly (string | Column)[]

        the columns to aggregate, which can be renaming expressions such as "Out = In". Defaults to null, which is valid only in aggAllBy where it will be ignored.

      Returns Sum

      an aggregation

    • Creates a T-Digest aggregation, storing the T-Digest data structure for later percentile calculations.

      Parameters

      • Optionalcompression: number

        T-Digest compression factor, which must be ≥ 1. If null, the server chooses a default.

      • Optionalcolumns: readonly (string | Column)[]

        the columns to aggregate, which can be renaming expressions such as "Out = In". Defaults to null, which is valid only in aggAllBy where it will be ignored.

      Returns TDigest

      an aggregation

    • Creates a Unique aggregation, returning the single unique value within each group. If there is more than one distinct value, the result is nonUniqueSentinel.

      Parameters

      • Optionalcolumns: readonly (string | Column)[]

        the columns to aggregate, which can be renaming expressions such as "Out = In". Defaults to null, which is valid only in aggAllBy where it will be ignored.

      • OptionalincludeNulls: boolean

        whether null is treated as a value for determining uniqueness. Defaults to false.

      • OptionalnonUniqueSentinel: NonUniqueSentinelUnion

        the value for a group with more than one distinct value. Defaults to null.

      Returns Unique

      an aggregation

    • Creates a Var (sample variance) aggregation, computed using Bessel's correction.

      Parameters

      • Optionalcolumns: readonly (string | Column)[]

        the columns to aggregate, which can be renaming expressions such as "Out = In". Defaults to null, which is valid only in aggAllBy where it will be ignored.

      Returns Var

      an aggregation

    • Creates a Weighted Average aggregation.

      Parameters

      • weightColumn: string | Column

        the column containing the weights

      • Optionalcolumns: readonly (string | Column)[]

        the columns to aggregate, which can be renaming expressions such as "Out = In". Defaults to null, which is valid only in aggAllBy where it will be ignored.

      Returns WAvg

      an aggregation

    • Creates a Weighted Sum aggregation.

      Parameters

      • weightColumn: string | Column

        the column containing the weights

      • Optionalcolumns: readonly (string | Column)[]

        the columns to aggregate, which can be renaming expressions such as "Out = In". Defaults to null, which is valid only in aggAllBy where it will be ignored.

      Returns WSum

      an aggregation