Interview questions · medium
How many cities does each department operate in? List the top 3 departments in terms of the most number of cities. In case of a tie, order by dept_id.
List every combination of dept_name, employee_name, and city such that the employee belongs to the department and the same city in which the department is located.
Add a column to the Employees table that shows the name of the employee with the next higher employee_id.
Find the third-highest salary for each department.
Write a PySpark job to find the top 3 employees of each department, where Age < 30 and Salary > department average salary.
Write a PySpark script to read a CSV file, filter rows where the age column is less than 18, and write the result to a new CSV file.
Type or paste your answer to any of these questions and our AI Coach scores it, highlights gaps, and rewrites it at FAANG quality. Free to try.