COUNT_IF

Learn how to use the COUNT_IF aggregate function in PlaidCloud Lakehouse. Returns the number of rows for which the expression is TRUE.

Returns the number of rows for which the expression is TRUE.

Analyze Syntax

func.count_if(get_column(table, 'salary') > 80000)

Analyze Examples

func.count_if(get_column(table, 'salary') > 80000)

┌────┐
 42 
└────┘

SQL Syntax

COUNT_IF(<salary> > 80000)

SQL Examples

SELECT COUNT_IF(salary > 80000) FROM employees;

┌────┐
 42 
└────┘