Advertisement
fbinnzhivko

Untitled

Jun 20th, 2017
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 0.40 KB | None | 0 0
  1. select * from
  2. (select f.flight_id , f.departure_time, f.arrival_time, a.airport_name as origin, t.airport_name as destination
  3.   from Flights as f
  4.   inner join airports as a on f.origin_airport_id = a.airport_id
  5.   inner join airports as t on f.destination_airport_id = t.airport_id
  6.   where f.`status` = 'Departing'
  7.   order by f.departure_time desc
  8.   limit 5) as q
  9. order by q.departure_time, q.flight_id
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement