Aggregation functions in SQL are used to combine multiple values. Commonly used functions are: SUM() for summation, AVG() for average value, MIN() for minimum value, MAX() for maximum value, and COUNT. () finds the count, DISTINCT COUNT() finds the unique count, TOTAL() finds the sum within the partition, AVERAGE() finds the average within the partition, BIT_AND() finds the bitwise AND, BIT_OR() finds the bitwise OR, GREATEST() finds the maximum Value, LEAST() finds the minimum value.
Aggregation Functions in SQL
Aggregation functions are used to combine multiple values in a data set into a single value . Commonly used aggregate functions in SQL include:
1. Sum function: SUM()
2. Average function: AVG()
3. Find the minimum value function: MIN()
4. Maximum function: MAX()
5. Find the counting function: COUNT()
6. Find the unique count function: DISTINCT COUNT()
7. Total function: TOTAL()
8. Average function: AVERAGE()
9. Function to find the sum of digits: BIT_AND()
10. Find the bitwise OR function: BIT_OR()
11. Maximum function: GREATEST()
12. Minimum value function: LEAST()
The above is the detailed content of What are the commonly used aggregate functions in SQL?. For more information, please follow other related articles on the PHP Chinese website!