count [if logical statement]
Command abbreviated form: None
The COUNT command counts the number of records in the data set. If there is any active select, the result
of count will be the number of records matching the select statement.
If you use the syntax count if [logical statement] only records for what the logical statement is true
will be counted.
Output:
Count: 75
A single line showing the total count is displayed.
Examples and Hints
COUNT (Counts the number of records in the data set.Records can be afected for a previous select statement)
COUNT IF SEX="M" (Counts the number of records with SEX="M")
COUNT IF SEX="M" AND ILL="YES"(Counts the number of "Ill males")
COUNT IF 10*dectime >= 31 (is ok if you wish to count records where dectime>= 3.1)
Notice:
Remember that COUNT is always afected for any select statement
It must be used careful with float variables
Related Commands:
Select
Options:
Output variables:
Output definition:
References:
Top