T-SQL Tutorial

SQL AVG function


AVG Syntax:

SELECT AVG(column_name) FROM table_name

Sales table:

IDPRICENAME
1200A
2500B
3900C
4500D

AVG Example:

SELECT AVG(price) FROM store;

AVG Result:

525