Skip to main content
SQL • LESSON 63

SUM

How can we calculate total salary expenditure?

Intermediate3 Minutes760 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