Minimum Travel Time in SQL

Question:

Minimum Travel Time

Display schedule_id, source, destination and travel_time which has minimum travel time. Sort the result based on schedule id

Minimum Travel Time

Code:

Main.sql

select schedule_id, source, destination, duration
from schedule
where duration=(select min(duration) from schedule)
order by 1;

Recommended:

1 thought on “Minimum Travel Time in SQL”

Leave a Comment

Your email address will not be published. Required fields are marked *

x