The employees table contains salaries by department.
Return department, payroll, payroll_share, where payroll is the department's total salary and payroll_share is that department's percentage of total company payroll, rounded to 2 decimal places. Sort by department ascending.
These DataFrames are passed to solve(spark, dfs). Access one with dfs['name'].
employees7 rows| employee_id (int) | department (string) | salary (double) |
|---|---|---|
| 1 | Engineering | 100000 |
| 2 | Engineering | 80000 |
| 3 | Sales | 60000 |
| 4 | Sales | 50000 |
| 5 | HR | 40000 |
| 6 | Marketing | 70000 |
| 7 | Engineering | 120000 |
Column names and order must match. Sort order is specified in the question.