COUNT_IF

Function COUNT_IF is also found in the following categories: Window functions.

Syntax

COUNT_IF( condition )
COUNT_IF( condition
          [ FIXED ... | INCLUDE ... | EXCLUDE ... ]
          [ BEFORE FILTER BY ... ]
        )

More info:

Description

Returns the number of items in the group meeting the condition condition.

Argument types:

  • conditionBoolean

Return type: Integer

Example

COUNT_IF([Profit] > 5)

Data source support

ClickHouse 19.13, Microsoft SQL Server 2017 (14.0), MySQL 5.6, PostgreSQL 9.3.

Previous
Next