SUM and AVG
SUM adds up all values in a column. AVG calculates the average.
Total payroll:
Average salary:
Combine with WHERE:
These ignore NULL values automatically.
Check your understanding
What is the average salary across all employees?
Examples run on the employees sample database. Open any of them in the playground to experiment.