We have a table with employees and their salaries, however, some of the records are old and contain outdated salary information. Find the current salary of each employee assuming that salaries increase each year. Output their id, first name, last name, department ID, and current salary. Order your list by employee ID in ascending order.
Problem Difficulty Level : Medium
Data Structure
Data for this problem
In Spark we will solve this problem using two ways
- Using PySpark Functions
- Using Spark SQL
Use below notebook for solution
In Postgre SQL We will load data from CSV using PostgreSQL Import functionality. And then we will solve this problem.
Output Query
Please also follow below blog for understanding this problem