COUNT

Returns the number of rows or non-NULL values.

Analyze Syntax

func.count()

Analyze Examples

func.count()

SQL Syntax

COUNT()

SQL Examples

SELECT COUNT(*) FROM employees;

┌──────────┐
 count(*) 
├──────────┤
     1000 
└──────────┘

SELECT COUNT(DISTINCT department) FROM employees;

┌──────────────────────────────┐
 count(distinct department)   
├──────────────────────────────┤
                            5 
└──────────────────────────────┘