Courtman
Paranoid Android
- Local time
- Today, 11:21
- Joined
- Dec 8, 2001
- Messages
- 34
Hi,
I am trying to get a query to do the following. With this data:
Date - From - To
01-Jan-02 - Luton - Manchester
01-Jan-02 - Manchester - Luton
02-Jan-02 - Luton - Fenland
03-Jan-02 - Leicester - Luton
I want an output that would count the number of times I've visited Luton, Manchester etc. Previously I just worked on the departure airfield but this may not pick up an airfield if I've only LANDED there... The output should look as follows:
Airfield - First Visit - Last Visit - No. of Visits
Fenland - 02-Jan-02 - 02-Jan-02 - 1
Leicester - 03-Jan-02 - 03-Jan-02 - 1
Luton - 01-Jan-02 - 03-Jan-02 - 4
Manchester - 01-Jan-02 - 01-Jan-02 - 2
How do I make a query look at the From and To fields in the main table and come up with the above answer?
Thanks all!
I am trying to get a query to do the following. With this data:
Date - From - To
01-Jan-02 - Luton - Manchester
01-Jan-02 - Manchester - Luton
02-Jan-02 - Luton - Fenland
03-Jan-02 - Leicester - Luton
I want an output that would count the number of times I've visited Luton, Manchester etc. Previously I just worked on the departure airfield but this may not pick up an airfield if I've only LANDED there... The output should look as follows:
Airfield - First Visit - Last Visit - No. of Visits
Fenland - 02-Jan-02 - 02-Jan-02 - 1
Leicester - 03-Jan-02 - 03-Jan-02 - 1
Luton - 01-Jan-02 - 03-Jan-02 - 4
Manchester - 01-Jan-02 - 01-Jan-02 - 2
How do I make a query look at the From and To fields in the main table and come up with the above answer?
Thanks all!
Last edited: