Back to Browse

SQL Interview Questions and answers Part 23 | SQL Scenario based Interview Question and Answer

11.6K views
Jul 18, 2020
12:34

SQL Interview Questions and answers Part 23 | SQL Scenario based Interview Question and Answer I have missed one condition " AND B.Destination=A.Source " in correlated subquery in the video. Kindly add this condition while referring the video. Input :- Travel_Table has three columns namely Source, Destination and Distance. Problem Statements :- Write SQL to get unique combination of two columns Source and Destination irrespective of order of columns as shown below :- Follow me on Social Networking Sites : *Twitter: https://twitter.com/sunilkr5672 *Instagram : https://www.instagram.com/itjunction4al Input Scripts Create Table Travel_Table( Start_Location Varchar(30), End_Location Varchar(30), Distance int) Insert into Travel_Table Values('Delhi','Pune',1400); Insert into Travel_Table Values('Pune','Delhi',1400); Insert into Travel_Table Values('Bangalore','Chennai',350); Insert into Travel_Table Values('Mumbai','Ahmedabad',500); Insert into Travel_Table Values('Chennai','Bangalore',350); Insert into Travel_Table Values('Patna','Ranchi',300); #SQLInterviewQuestionsandanswers #sqlInterviewQuestions #sqlInterviewQuestionsForTesting #sqlInterviewQuestionsQuery #sqlInterviewQuestionsOnJoins #sqlTechnicalInterviewQuestions #SQLforETLTesters #CommonSqlInterviewQuestions #ETLTesting #ITJunction4ALL

Download

0 formats

No download links available.

SQL Interview Questions and answers Part 23 | SQL Scenario based Interview Question and Answer | NatokHD