Interview Query

HR Salary Reporting

Start Timer

0:00:00

Upvote
6
Downvote
Save question
Mark as completed
View comments (8)
Next question

The HR department in your organization wants to calculate employees’ earnings.

Write a query to report the sum of regular salaries, overtime pay, and total compensations for each role.

Example:

Input:

employees table

Column Type
employee_id INTEGER
job_title VARCHAR
salary FLOAT
overtime_hours INTEGER
overtime_rate FLOAT

Output:

Column Type
job_title VARCHAR
total_salaries FLOAT
total_overtime_payments FLOAT
total_compensation FLOAT
.
.
.
.
.


Comments

Loading comments