Skip to content

count

relationalai.semantics.std.aggregates
count(*args: AggValue) -> Aggregate

Count the number of values.

Parameters

  • *args

    (AggValue, default: ()) - Values to count. Can include Distinct wrapper for distinct count.

Returns

  • Aggregate - An Aggregate representing the computation of the count. Returns Integer.

Examples

Count all employees:

select(aggregates.count(Employee))

Count employees per department:

select(Department, aggregates.count(Employee).per(Department))