UK ['e?vɡ] US ['e?vɡ]
abbr.average average
mysql AVG() function syntax
Function: The AVG function returns the average value of the numerical column. NULL values ??are not included in the calculation.
Syntax: SELECT AVG(column_name) FROM table_name
mysql AVG() function example
//計算 "OrderPrice" 字段的平均值 SELECT AVG(OrderPrice) AS OrderAverage FROM Orders; //找到 OrderPrice 值高于 OrderPrice 平均值的客戶 SELECT Customer FROM Orders WHERE OrderPrice>(SELECT AVG(OrderPrice) FROM Orders);