This syntax … | Counts the total number of rows … |
---|---|
COUNT(value_expression) | in the group for which value_expression is not null. |
COUNT (DISTINCT value_expression) | in the group for which value_expression is unique and not null. |
COUNT(*) | in the group of rows on which COUNT operates. |
COUNT is valid for any data type.