firstval

firstval function — Dynamic aggregate function for firstval

SYNOPSIS

firstval (expr)

DESCRIPTION

Returns the first value for the range of values returned by a query predicate. Expressions expr must be a StreamBase expression. The returned first value is the same type as expr. If the query returns no rows, the aggregate returns null when no group by is specified and no rows when a group by is specified.

The function name is case-sensitive. This function exists for dynamic (query-based) aggregation only.