Company: flipkart-grid-8.0_19thjuly_2
Difficulty: medium
Second Highest January Salary Read this first - this is a programming question, not a SQL question. The data is described in database terms below because that is how the original assessment posed it, but no database is involved. The tables are handed to your program on standard input as pipe-delimited text (see Input Format ), and you print the answer on standard output . Solve it in Python, C++ or Java by completing the solve function in the starter code. A SQL query submitted here will not run. Description A company keeps its payroll in five tables: dept , emp , designation , compensation and emp_dept . The employer wants to know the second-highest salary paid to an employee in the month of January 2021 , together with the people who received it and the departments they work in today. The Tables The column types below describe the shape of each field; they are documentation only, and the values reach you as text on stdin. emp(emp_no INT, dob DATE, first_name VARCHAR(14), last_name VA