1.AVG ()
Usage: Averaging
Example:
Mysql> Select * fromT1;+----+------+----------+---------+-------+-------+|Id|Name|Password|test001|Test3|Test4|+----+------+----------+---------+-------+-------+| 2 | 1 | 1 | 1 | 1 | 1 || 3 | 3 | 4 | 5 | 6 | 7 || 4 | 3 | 4 | 5 | 6 | 7 || 5 | 3 | 4 | 5 | 6 | 7 || 6 | 3 | 4 | 5 | 6 | 7 || 7 | 3 | 4 | 5 | 6 | 7 || 8 | 3 | 4 | 5 | 6 | 7 || 9 | 3 | 4 | 5 | 6 | 7 || Ten | 3 | 4 | 5 | 6 | 7 |+----+------+----------+---------+-------+-------+9Rowsinch Set(0.00sec) MySQL> Select AVG(ID) fromT1;+---------+| AVG(ID)|+---------+| 6.0000 |+---------+1Rowinch Set(0.00Sec
2.COUNT ()
Usage: Record number of bars
Example:
Mysql> Select COUNT(ID) fromT1;+-----------+| COUNT(ID)|+-----------+| 9 |+-----------+1Rowinch Set(0.00Sec
3.MAX ()
Usage: Returns the maximum value
Example:
Mysql> Select MAX(ID) fromT1;+---------+| MAX(ID)|+---------+| Ten |+---------+1Rowinch Set(0.01Sec
4.MIN ()
Usage: Returns the minimum value
Example:
Mysql> Select MIN(ID) fromT1;+---------+| MIN(ID)|+---------+| 2 |+---------+1Rowinch Set(0.00Sec
5.SUM ()
Usage: Sum
Example:
Mysql> Select SUM(ID) fromT1;+---------+| SUM(ID)|+---------+| Wu |+---------+1Rowinch Set(0.00Sec
Others: MD5 (), PASSWORD ()
Mysql> SelectMD5 ('MYSQL');+----------------------------------+|MD5 ('MYSQL')|+----------------------------------+|14498b83dd1667a0c78f4fdaf5afbf4b|+----------------------------------+1Rowinch Set(0.00sec) MySQL> SelectPASSWORD ('MYSQL');+-------------------------------------------+|PASSWORD ('MYSQL')|+-------------------------------------------+| *a97af8e14502c1b988202fb7b96cf565b6523f9d|+-------------------------------------------+1Rowinch Set(0.00sec) MySQL> SelectEncypt ('MYSQL'); ERROR1305(42000):FUNCTIONTest. Encypt does notExistmysql> SelectENCRYPT ('MYSQL');+------------------+|ENCRYPT ('MYSQL')|+------------------+| NULL |+------------------+1Rowinch Set(0.03Sec
MySQL's aggregation function