Using Aggregate Functions in MySQL

Published September 20, 2026 By Sai Sree Ram Gundepudi

Example

SELECT department_id, AVG(salary) FROM employees GROUP BY department_id;

Was this solution helpful?

Your feedback helps improve our technical knowledge repository.

Share this article