Name
AVG( )
Synopsis
AVG(column
)
This function returns the average or mean of a set of numbers given
as the argument. Use it in conjunction with GROUP
BY
clause.
SELECT col1, AVG(col2) FROM table1 GROUP BY col1;
Get MySQL in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.