Hi I'm struggling with the following query, if I'm honest I'm not sure where to start with it:
Original table:
|Poskey|Date | Action|
|1 |05/06/2011|Ballast |
|1 |05/06/2011|Sleeper|
|1 |05/06/2011|Rail |
|1 |23/02/2009|Ballast |
|2 |06/02/2008|Ballast |
|2 |06/02/2008|Rail |
|3 |20/05/2009|Ballast |
|3 |20/05/2009|Sleeper|
|3 |20/05/2009|Rail |
|3 |18/02/2008|Rail |
|4 |15/01/2000|Ballast |
|4 |15/01/2000|Sleeper|
|4 |15/01/2000|Rail |
I would like a query which tells me which "Poskeys" Have had the "Action" Ballast and Rail and Sleeper all on the same date. An "Action" may have occurred at a prior or later date, it doesn't matter as long as all three actions have occurred on the same date.
Also the the action must have occurred after the year 2001 therefore using the above table the query would select these "Poskey" values:
1 and 3
Thanks in advance,
Matt
Original table:
|Poskey|Date | Action|
|1 |05/06/2011|Ballast |
|1 |05/06/2011|Sleeper|
|1 |05/06/2011|Rail |
|1 |23/02/2009|Ballast |
|2 |06/02/2008|Ballast |
|2 |06/02/2008|Rail |
|3 |20/05/2009|Ballast |
|3 |20/05/2009|Sleeper|
|3 |20/05/2009|Rail |
|3 |18/02/2008|Rail |
|4 |15/01/2000|Ballast |
|4 |15/01/2000|Sleeper|
|4 |15/01/2000|Rail |
I would like a query which tells me which "Poskeys" Have had the "Action" Ballast and Rail and Sleeper all on the same date. An "Action" may have occurred at a prior or later date, it doesn't matter as long as all three actions have occurred on the same date.
Also the the action must have occurred after the year 2001 therefore using the above table the query would select these "Poskey" values:
1 and 3
Thanks in advance,
Matt