Challenge 2Challenge 2

Task

You need to join the three tables: passenger, departure and flights:

  1. Select name_passenger and surname_passenger from the passenger table;
  2. Select travel_time from the flights table;
  3. Join the departure table and passenger table by the number_of_departure column. Join the departure table and flights table by flight_number column;
  4. Make filtering: flight time (travel_time column) must be more than 10 hours.

Here's a short example of the departure table:

number_of_departureflight_numberdeparture_datedeparture_time
132022-07-1608:00:00
212022-07-1813:15:00
............
632022-07-1608:00:00

Here's a short example of the passenger table:

idnumber_of_departurename_passengersurname_passenger
15LiamSmith
25OliviaJohnson
............
185OliviaJohnson

Here's a short example of the flights table:

flight_numberstart_point_flightend_point_flighttravel_time
1ParisNew York8
2ChicagoNew Delhi15
3New YorkDubai12
4Los AngelesHonolulu5

Everything was clear?

Section 3. Chapter 7
toggle bottom row