Commonly Asked SQL Interview Question | Exchange Seats | SQL for Data Analytics
In this video we will asked one commonly asked SQL interview question where we need to swap / exchange consecutive seats of students.
Take your SQL skills to SKY : https://www.namastesql.com/
00:00 problem statement
01:11 method 1
04:20 method 2
06:54 update statement
script:
CREATE TABLE seats (
id INT,
student VARCHAR(10)
);
INSERT INTO seats VALUES
(1, 'Amit'),
(2, 'Deepa'),
(3, 'Rohit'),
(4, 'Anjali'),
(5, 'Neha'),
(6, 'Sanjay'),
(7, 'Priya');
Zero to hero(Advance) SQL Aggregation:
https://youtu.be/5Ighj_2PGV0
Most Asked Join Based Interview Question:
https://youtu.be/xR87ctOgpAE
Solving 4 Trick SQL problems:
https://youtu.be/Ck1gQrlS5pQ
Data Analyst Spotify Case Study:
https://youtu.be/-YdAIMjHZrM
Top 10 SQL interview Questions:
https://youtu.be/Iv9qBz-cyVA
Interview Question based on FULL OUTER JOIN:
https://youtu.be/KQfWd6V3IB8
Playlist to master SQL :
https://youtube.com/playlist?l....ist=PLBTZqjSKn0IeKBQ
Rank, Dense_Rank and Row_Number:
https://youtu.be/xMWEVFC4FOk
leetcode 626. Exchange Seats
#sql #interviewquestion