I need the SQL statements for the following questions: 10 List the trip IDs abd
ID: 3712658 • Letter: I
Question
I need the SQL statements for the following questions: 10 List the trip IDs abd trip names for each pair of trips that have the same start location. (For example, One such pair would be trip ID 2 and trip ID 3because the start location of both trips is Weathersfield.) The first trip ID listed should be the major sort key, and the second trip ID should be the minor sakeI need the SQL statements for the following questions: 10 List the trip IDs abd trip names for each pair of trips that have the same start location. (For example, One such pair would be trip ID 2 and trip ID 3because the start location of both trips is Weathersfield.) The first trip ID listed should be the major sort key, and the second trip ID should be the minor sake
I need the SQL statements for the following questions: 10 List the trip IDs abd trip names for each pair of trips that have the same start location. (For example, One such pair would be trip ID 2 and trip ID 3because the start location of both trips is Weathersfield.) The first trip ID listed should be the major sort key, and the second trip ID should be the minor sake
Explanation / Answer
Please find below query which will retrive all trip id and trip names based on matched same location.
Select TRIP_ID, TRIP_NAME from TRIPS where TRIP_LOCATION = (select TRIP_LOCATION from TRIPS);