Skip to main content
SQL โ€ข LESSON 63

SUM

How can we calculate total salary expenditure?

Intermediateโฑ 3 Minutesโญ 760 XP
๐Ÿค” THE QUESTION

How can we calculate total salary expenditure?

๐Ÿ’ก WHAT IS IT?

SUM() calculates the total numerical summation of a specified column across all matching rows.

๐ŸŽฏ WHAT IS IT USED FOR?

Payroll totals, quarterly revenue calculations, inventory value summation.

๐Ÿ’ป EXAMPLE
SELECT SUM(salary) AS total_salary
FROM employees;

๐ŸŽฏ Mission Objectives

Practice typing production-grade SQL code for SUM.

  • โœ“ SUM() function
  • โœ“ Numerical summation
  • โœ“ Payroll analytics
  • โœ“ Total metrics