"MySQL: DQL language learning function _ _ common group function"

A common function: group function

max: maximum
min: minimum value
SUM: sum
AVG: average
count: counting the number of  

  
functions: to make use of the statistics, also known as statistical functions, aggregate functions, the function set.
Features:
① Syntax
select max (field) from table ;

② types supported
sum and avg ships for processing numeric
max, min, count can handle any type of data

③ above group functions ignore null

④ can be used with distinct use to achieve deduplication statistics
such as: select sum (distinct field) from table;

Guess you like

Origin blog.csdn.net/yexiangCSDN/article/details/104821223