title: Need help forming an SQL query for a Flight Database
body: <p>(the query needs to run in MySql)</p>
  
  <p>ok so first off here is the schema we have (its incomplete at the moment)</p>
  
  <p><img src="https://i.stack.imgur.com/OJwW9.png" alt="enter image description here"></p>
  
  <p>just to clarify the "flightinfo" table contains detailed information about a flight for a specifc airline, while the "flight" table contains the actual route a flight will take.  It should be noted that there are many flights corresponding to a single flight info instance.  For example flight Delta257 can make multiple flights in a single day like from JFK to MSP then from MSP to LAX.</p>
  
  <p>The query im trying to figure out its this: given an origin and destination airport, report the flights that would get you from the origin airport to the destination airport.  Also do not worry about the cost fields at the moment I simply need to report the flight path for now.</p>
  
  <p>Here is an example of what I want with sample data I am using:</p>
  
  <p>Here is sample data</p>
  
  <p><img src="https://i.stack.imgur.com/cL2ly.png" alt="enter image description here"></p>
  
  <hr>
  
  <p>For departure airport "LGA" and destination aiport "BKK" the query should return the following</p>
  
  <pre><code>FlightNumber | Airline | Departure Airport | Destination Airport 
  --------------------------------------------------------------------------
  264             SW              LGA             STL
  241             DL              STL             HKG
  242             TG              HKG             BKK
  </code></pre>
  
  <p>Thanks a lot I hope I made it clear enough.  Any sort of help or direction would be appreciated.</p>