Name

count() — Count the number of rows

Common Usage

count( expression )
count( * )

Description

The count() aggregate counts the number of rows with a non-NULL expression . If expression is given as an asterisk character (*), the total number of rows in an aggregate group will be returned, regardless of value. In some situations, the computation for the count( * ) syntax can be optimized and the result value can be computed without an actual data scan.

See Also

sum(), total()

Get Using SQLite now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.