Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Determine the average total compensation, including salaries and bonuses, for employees categorized by their job titles and gender. To calculate total compensation, sum the salaries
Determine the average total compensation, including salaries and bonuses, for employees categorized by their job titles and gender. To calculate total compensation, sum the salaries and bonuses for employees who receive bonuses. Do consider that some employees might receive multiple bonuses.
The output should include employee titles, gender referred to as "sex" and the average compensation. It should be in increasing order of average total compensation
Tables Schema as Below:
Employees
columnName dataType
id INT
firstname VARCHAR
lastname VARCHAR
age INT
sex CHAR
employeetitle VARCHAR
department VARCHAR
salary DECIMAL
target INT
email VARCHAR
city VARCHAR
address VARCHAR
managerid INT
Bonuses
columnName dataType
workerrefid INT
bonus DECIMAL
Output
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started