Q3.1: find the average salary of employees in each position.
role
average_salary
Legal
73653.0
Marketing
51622.5
Sales
27943.0
Software Engineer
92849.5
Tax Accountant
85946.0
Section
Q3.2 Find the salary of each position as a proportion of the total employee salary. [Pattern 1]
role
proportion
Legal
0.243069180314343
Marketing
0.17036425890021
Sales
0.138325976651128
Software Engineer
0.306421352254445
Tax Accountant
0.141819231879873
Section
Q3.2 Find the salary of each position as a proportion of the total employee salary. [Pattern 2]
role
proportion
Legal
0.243069180314343
Marketing
0.17036425890021
Sales
0.138325976651128
Software Engineer
0.306421352254445
Tax Accountant
0.141819231879873
Section
Q4: Employees with a salary higher than 75,000 are called Managers, salaries from 45,000 to 75,000 are called Seniors, and those with salaries less than that are called Staff.
employee_id
first_name
last_name
salary
employee_category
1
Warde
Remon
40153
Staff
2
Orlando
Groneway
46670
Senior
3
Amalita
Shorland
71983
Senior
4
Reinwald
Pickersail
15857
Staff
5
Ilario
Anfrey
95174
Manager
6
Davey
Frowen
27819
Staff
7
Leigha
Randlesome
75323
Manager
8
Junia
Yakovliv
90525
Manager
9
Rochell
Waggatt
85946
Manager
10
Moises
Ardley
56575
Senior
Section
Q5: If an employee comes on 14-Oct-23 for the Marketing position with a salary of 45,000 baht, what will the latest average salary for the Marketing position?