zmień kontrast font size: A A A
rss polski
you are at Encyclopedia of SQL >> AVG

AVG( `column_name` )

AVG() counts average worth of column given as a parameter.

Syntax


SELECT AVG(`column_name`) FROM `table_name`

Example

Count average age of people from `people` table

namesurnameage
PawełKowalski3
PiotrJanik7
MichałNowak14

query


SELECT AVG(`age`) FROM `people`

result

AVG(`age`)
8
[ wróć na górę strony ]