I have two tables.
The first table contains the start and destination positions of a flight.The table fields are as follows,
Table 1:
Flight No,
Start date and time,
destination date and time,
start latitude,
start longitude,
destination latitude,
destination longitude
The second table contains various countries the flight has travelled in a particular trip(between the start and destination country of the previous table). The table contents are as follows,
Table 2:
Flight No,
latitude,
longitude,
Time and date
Now I want to create a new table with all the countries( latitude and longitude coordinates) the flight has travelled between a particular start and destination points by taking flight no as key and checking the [Time and date] field of Table 2, whether the date falls between the [start date and time] and [destination date and time] of Table 1: and grouping a particular trip and name it as [tripID] .. This is required to plot the points travelled by the flight in a particular trip.