SQL basics- complete reference guide - part4 - Aggregate Functions in SQL

Part4: Aggregate Functions in SQL- complete reference sheet

Command/FunctionDescriptionSYNTAXExample
AVGThe average (mean) value.AVG ( [ DISTINCT ] { int | long | decimal | double } )
BOOL_ANDReturns true if all expressions are true.BOOL_AND(boolean)
BOOL_ORReturns true if any expression is true.BOOL_OR(boolean)
COUNTThe count of all row, or of the non-null values.COUNT( { * | { [ DISTINCT ] expression } } )
GROUP_CONCATConcatenates strings with a separator.GROUP_CONCAT ( [ DISTINCT ] string
[ ORDER BY { expression [ ASC | DESC ] } [,...] ]
[ SEPARATOR expression ] )
MAXThe highest value.MAX(value)
MINThe lowest value.MIN(value)
SUMThe sum of all values.SUM( [ DISTINCT ] { int | long | decimal | double } )
SELECTIVITYEstimates the selectivity (0-100) of a value.SELECTIVITY(value)
STDDEV_POPThe population standard deviation.STDDEV_POP( [ DISTINCT ] double )
STDDEV_SAMPThe sample standard deviation.STDDEV_SAMP( [ DISTINCT ] double )
VAR_POPThe population variance (square of the population standard deviation).VAR_POP( [ DISTINCT ] double )
VAR_SAMPThe sample variance (square of the sample standard deviation).VAR_SAMP( [ DISTINCT ] double )

No comments :

Post a Comment

Your Comment and Question will help to make this blog better...