SQL: Department Salary Budget

Medium
SQL — Aggregation SQL SUM GROUP BY
Calculate total salary budget per department.

Constraints

Write standard SQL (MySQL 8.0 compatible).

Examples

Example 1:
Input: dept salary IT 5000 IT 6000 HR 4000
Output:
Example 2:
Input: dept salary IT 5000 IT 6000 HR 4000
Output:

Hints

SUM with GROUP BY.
▲ Console

Install Talent Arabia

Get instant access to jobs and career tools on your device.