In this video we will solve a ITC Infotech SQL interview question using 3 solutions. here is the script:
CREATE TABLE city_distance
(
distance INT,
source VARCHAR(512),
destination VARCHAR(512)
);
delete from city_distance;
INSERT INTO city_distance(distance, source, destination) VALUES ('100', 'New Delhi', 'Panipat');
INSERT INTO city_distance(distance, source, destination) VALUES ('200', 'Ambala', 'New Delhi');
INSERT INTO city_distance(distance, source, destination) VALUES ('150', 'Bangalore', 'Mysore');
INSERT INTO city_distance(distance, source, destination) VALUES ('150', 'Mysore', 'Bangalore');
INSERT INTO city_distance(distance, source, destination) VALUES ('250', 'Mumbai', 'Pune');
INSERT INTO city_distance(distance, source, destination) VALUES ('250', 'Pune', 'Mumbai');
INSERT INTO city_distance(distance, source, destination) VALUES ('2500', 'Chennai', 'Bhopal');
INSERT INTO city_distance(distance, source, destination) VALUES ('2500', 'Bhopal', 'Chennai');
INSERT INTO city_distance(distance, source, destination) VALUES ('60', 'Tirupati', 'Tirumala');
INSERT INTO city_distance(distance, source, destination) VALUES ('80', 'Tirumala', 'Tirupati');
Zero to hero(Advance) SQL Aggregation:
• All About SQL Aggregations | SQL Adva...
Most Asked Join Based Interview Question:
• Most Asked SQL JOIN based Interview Q...
Solving 4 Trick SQL problems:
• Solving 4 Tricky SQL Problems
Data Analyst Spotify Case Study:
• Data Analyst Spotify Case Study | SQL...
Top 10 SQL interview Questions:
• Top 10 SQL interview Questions and An...
Interview Question based on FULL OUTER JOIN:
• SQL Interview Question Based on Full ...
Playlist to master SQL :
• Complex SQL Questions for Interview P...
Rank, Dense_Rank and Row_Number:
• RANK, DENSE_RANK, ROW_NUMBER SQL Anal...
#sql #dataengineer