U.s. news & world report Interview Questions

U.s. news & world report Interview Guides

Click or hover over a slice to explore questions for that topic.
Data Structures & Algorithms
(21)
Machine Learning
(11)
SQL
(7)
Behavioral
(7)
Analytics
(6)

U.s. news & world report Interview Questions

Practice for the U.s. news & world report interview with these recently asked interview questions.

QuestionTopicDifficulty
SQL
Medium

Given the employees and departments table, write a query to get the top 3 highest employee salaries by department. If the department contains less that 3 employees, the top 2 or the top 1 highest salaries should be listed (assume that each department has at least 1 employee). 

Note: The output should include the full name of the employee in one column, the department name, and the salary. The output should be sorted by department name in ascending order and salary in descending order. 

Example:

Input:

employees table

Column Type
id INTEGER
first_name VARCHAR
last_name VARCHAR
salary INTEGER
department_id INTEGER

departments table

Column Type
id INTEGER
name VARCHAR

Output:

Column Type
employee_name VARCHAR
department_name VARCHAR
salary INTEGER
SQL
Hard
SQL
Medium
Loading pricing options

View all U.s. news & world report questions

Challenge

Check your skills...
How prepared are you for working at U.s. news & world report?

Discussion & Interview Experiences

?
There are no comments yet. Start the conversation by leaving a comment.