4D v14

COUNT

Home

 
4D v14
COUNT

COUNT  


 

 

Command COUNTCOUNT ({ [ [ALL |DISTINCT] arithmetic_expression] |* } )

The COUNT function returns the number of non-null values in the arithmetic_expression. The optional ALL and DISTINCT keywords are used to respectively retain or eliminate any duplicate values.

If you pass the * instead, the function returns the total number of records in the arithmetic_expression, including duplicate and NULL values.

Example  

This example returns the number of movies from the MOVIES table:

SELECT COUNT(*)
FROM MOVIES

 
PROPERTIES 

Product: 4D
Theme: Functions

 
SEE ALSO 

AVG
SUM

 
ARTICLE USAGE

4D SQL Reference ( 4D v11 SQL Release 4 )
4D SQL Reference ( 4D v14)
4D SQL Reference ( 4D v12.1)
4D SQL Reference ( 4D v13.4)
4D SQL Reference ( 4D v14 R2)
4D SQL Reference ( 4D v14 R3)
4D SQL Reference ( 4D v14 R4)