Command/Function | Description | SYNTAX | Example |
---|---|---|---|
AVG | The average (mean) value. | AVG ( [ DISTINCT ] { int | long | decimal | double } ) | |
BOOL_AND | Returns true if all expressions are true. | BOOL_AND(boolean) | |
BOOL_OR | Returns true if any expression is true. | BOOL_OR(boolean) | |
COUNT | The count of all row, or of the non-null values. | COUNT( { * | { [ DISTINCT ] expression } } ) | |
GROUP_CONCAT | Concatenates strings with a separator. | GROUP_CONCAT ( [ DISTINCT ] string [ ORDER BY { expression [ ASC | DESC ] } [,...] ] [ SEPARATOR expression ] ) | |
MAX | The highest value. | MAX(value) | |
MIN | The lowest value. | MIN(value) | |
SUM | The sum of all values. | SUM( [ DISTINCT ] { int | long | decimal | double } ) | |
SELECTIVITY | Estimates the selectivity (0-100) of a value. | SELECTIVITY(value) | |
STDDEV_POP | The population standard deviation. | STDDEV_POP( [ DISTINCT ] double ) | |
STDDEV_SAMP | The sample standard deviation. | STDDEV_SAMP( [ DISTINCT ] double ) | |
VAR_POP | The population variance (square of the population standard deviation). | VAR_POP( [ DISTINCT ] double ) | |
VAR_SAMP | The sample variance (square of the sample standard deviation). | VAR_SAMP( [ DISTINCT ] double ) |
SQL basics- complete reference guide - part4 - Aggregate Functions in SQL
Subscribe to:
Post Comments
(
Atom
)
No comments :
Post a Comment
Your Comment and Question will help to make this blog better...