Must Know Data Interview Question | WINDOW RANKING FUNCTION | INTERVIEW TIPS | SQL | PART 1
Welcome to series on Data Interview questions and answers! In this video, we'll cover the most asked and most common data questions that help you prepare nextgen data professionals for data engineer, data analyst, & BIE position. We'll explore technical and real-life case-based questions covering SQL, DAX, POWER BI, Python, ETL, data warehousing, machine learning, Microsoft Fabric, Azure & Snowflake Cloud platforms, Big Data frameworks (Databricks, Spark).
Want more similar videos- hit like, comment, share and subscribe
❤️Do Like, Share and Comment
❤️ Like Aim 1000 likes!
➖➖➖➖➖➖➖➖➖➖➖➖➖
Please like & share the video.
➖➖➖➖➖➖➖➖➖➖➖➖➖
Sample Data script
CREATE TABLE Employee (
employee_id INT ,
employee_name VARCHAR(50),
department_id INT,
salary DECIMAL(10, 2)
);
INSERT INTO Employee (employee_id, employee_name, department_id, salary)
VALUES (1, 'Alice Johnson', 1, 70000),
(2, 'Bob Smith', 1, 80000),
(3, 'Carol White', 1, 75000),
(4, 'David Brown', 1, 60000),
(5, 'Eva Green', 2, 55000),
(6, 'Frank Martin', 2, 70000),
(7, 'Carol White', 2, 80000),
(8, 'David Brown', 2, 70000),
(9, 'John Brown', 3, 70000),
(8, 'David Matt', 3, 80000),
(8, 'Sarah Brown', 3, 100000),
(8, 'Bobbie Warren', 3, 60000)
➖➖➖➖➖➖➖➖➖➖➖➖➖
what we have covered in this video:
RANKING Problem Statements - Solved using CTE (Common Table Expression) & SQL Window Functions
(MEDIUM & ADVANCE SQL DATA INTERVIEW CONCEPTS)
We also dived into difference between other ranking window functions - RANK, DENSE_RANK, ROW_NUMBER
We also looked as some tips and strategies for the standing out in your next data interview!
Summary:
MOST ASKED AND MOST IMPORTANT MUST KNOW INTERVIEW PROBLEM STATEMENT -
Find third (Nth) highest salary from the employee table with following fields
RANKING QUESTIONS CATEGORY
TIP 1 - USE CTE & WINDOW FUNCTIONS
TIP 2 - IDENTIFY KEYWORD
Look at the field after highest in the problem statement
Is it salary or employee as this is the field
to be used in Order by Clause
TIP 3 - Ask FOLLOW UP questions to the interviewer
regarding the data.
Are duplicates possible in the particular field?
TIP 4 - STAND OUT!! - Explain why you did not use
other ranking functions
➖➖➖➖➖➖➖➖➖➖➖➖➖
Hope this video was useful and you learned something new :) See you in next video, until then Bye!