Counts the number of rows in a group depending on the specified parameters.
COUNT( * | expression | DISTINCT expression )
* Return the number of rows in each group.
expression The expression for which to return the number of rows.
DISTINCT expression The expression for which to return the number of distinct rows.
Rows where the value is the NULL value are not included in the count.
SQL/2003 Core feature. Syntax 2 is feature T611.
The following statement returns each unique city, and the number of rows with that city value.
SELECT City, COUNT( * ) FROM Employees GROUP BY City; |
Send feedback about this page via email or DocCommentXchange | Copyright © 2008, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.0 |