Magical solutions Interview Questions

Magical solutions Interview Guides

Click or hover over a slice to explore questions for that topic.
SQL
(1)

Magical solutions Interview Questions

Practice for the Magical solutions interview with these recently asked interview questions.

QuestionTopicDifficulty
SQL
Medium

Let’s say we have a table representing a company payroll schema.

Due to an ETL error, the employees table, instead of updating the salaries every year when doing compensation adjustments, did an insert instead. The head of HR still needs the current salary of each employee.

Write a query to get the current salary for each employee.

Note: Assume no duplicate combination of first and last names (I.E. No two John Smiths). Assume the INSERT operation works with ID autoincrement.

Example:

Input:

employees table

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

Output:

Column Types
first_name VARCHAR
last_name VARCHAR
salary INTEGER
Loading pricing options

View all Magical solutions questions

Challenge

Check your skills...
How prepared are you for working at Magical solutions?

Discussion & Interview Experiences

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

Discussion & Interview Experiences

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

Jump to Discussion