On this page

    Categories: Aggregate, Window

    COUNT

    Returns the total number of records for the specified expression.

    Syntax

    COUNT(expression boolean) → int64

    • expression: Expression to evaluate number of records for. This value can either be a column name or *.

    Examples

    SELECT COUNT(column_name)
    -- 93456745
    

    COUNT(expression timestamp) → int64

    • expression: Expression to evaluate number of records for. This value can either be a column name or *.

    Examples

    SELECT COUNT(column_name)
    -- 89
    

    COUNT(expression int64) → int64

    • expression: Expression to evaluate number of records for. This value can either be a column name or *.

    Examples

    SELECT COUNT(column_name)
    -- 10
    

    COUNT(expression int32) → int64

    • expression: Expression to evaluate number of records for. This value can either be a column name or *.

    Examples

    SELECT COUNT(column_name)
    -- 93456745
    

    COUNT(expression float) → int64

    • expression: Expression to evaluate number of records for. This value can either be a column name or *.

    Examples

    SELECT COUNT(column_name)
    -- 990
    

    COUNT(in varchar) → int64

    • in: sample parameter description

    Examples

    SELECT COUNT(column_name)
    -- 1093456745
    

    COUNT(expression double) → int64

    • expression: Expression to evaluate number of records for. This value can either be a column name or *.

    Examples

    SELECT COUNT(column_name)
    -- 100
    

    COUNT(expression interval_year) → int64

    • expression: Expression to evaluate number of records for. This value can either be a column name or *.

    Examples

    SELECT COUNT(column_name)
    -- 93456745
    

    COUNT(expression decimal(0,0)) → int64

    • expression: Expression to evaluate number of records for. This value can either be a column name or *.

    Examples

    SELECT COUNT(column_name)
    -- 890
    

    COUNT(expression time) → int64

    • expression: Expression to evaluate number of records for. This value can either be a column name or *.

    Examples

    SELECT COUNT(column_name)
    -- 93456745
    

    COUNT(expression date) → int64

    • expression: Expression to evaluate number of records for. This value can either be a column name or *.

    Examples

    SELECT COUNT(column_name)
    -- 10000000
    

    COUNT(expression interval_day) → int64

    • expression: Expression to evaluate number of records for. This value can either be a column name or *.

    Examples

    SELECT COUNT(column_name)
    -- 200
    

    COUNT(expression varbinary) → int64

    • expression: Expression to evaluate number of records for. This value can either be a column name or *.

    Examples

    SELECT COUNT(column_name)
    -- 6789