
Asked in Accenture
Given an Employee table with columns Employee name, Salary, and Department, write a PySpark query to find the name of the employee with the second highest salary in each department.

AnswerBot
3mo
Find the 2nd highest salary employee in each department using PySpark.
Read the CSV file into a DataFrame using spark.read.csv().
Group the DataFrame by 'Department' and use the 'dense_rank()' function ...read more
Help your peers!
Add answer anonymously...
Top Data Engineering Analyst Interview Questions Asked at Accenture
Q. What are parquet files?
Q. Can you explain your academic projects?
Q. Suppose there is a file with 100 columns, and you only want to load 10 specific ...read more
Interview Questions Asked to Data Engineering Analyst at Other Companies
Stay ahead in your career. Get AmbitionBox app


Trusted by over 1.5 Crore job seekers to find their right fit company
80 L+
Reviews
10L+
Interviews
4 Cr+
Salaries
1.5 Cr+
Users
Contribute to help millions
AmbitionBox Awards
Get AmbitionBox app

