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 21.8, Microsoft SQL Server 2017 (14.0), MySQL 5.7, Oracle Database 12c (12.1), PostgreSQL 9.3, YDB.

Previous
Next