Reference Guide > TDV Support for SQL Functions > TDV-Supported Analytical Functions > COUNT
 
COUNT
COUNT returns the number of rows within a partition.
Syntax
COUNT ( [DISTINCT | ALL ] expression) OVER (window_clause)
 
or
COUNT (*) OVER (window_clause)
Remarks
Without a window clause, COUNT is a simple aggregate function. (See COUNT.)
Example
You want to count the total number of employees by hire date. Use a query like the following:
COUNT (*) OVER (ORDER BY hire_date)
 
This query first orders employees by hire date, and then applies COUNT (*).