Hi All,
I have a table which gets joining and leaving dates for crew, it is something like this:
SeatimeID, CrewID, JoinDate, LeaveDate
The CrewID is linked to a crew table and so therefore the data in the seatime table looks something like this :
1, 120, 1/1/23, 2/1/23
2, 12, 12/1/23, 23/4/23
3, 110, 12/2/22, 23/6/22
4, 120, 4/4/23, 17/6/23
5, 12, 6/8/23, 9/10/23
My question....how do I find the highest SeatimeID for each particular CrewID? I really want the query to return
3, 110, 12/2/22, 23/6/22
4, 120, 4/4/23, 17/6/23
5, 12, 6/8/23, 9/10/23
I've tried a few different ways to achieve this and I cannot seem to get it right?
I have a table which gets joining and leaving dates for crew, it is something like this:
SeatimeID, CrewID, JoinDate, LeaveDate
The CrewID is linked to a crew table and so therefore the data in the seatime table looks something like this :
1, 120, 1/1/23, 2/1/23
2, 12, 12/1/23, 23/4/23
3, 110, 12/2/22, 23/6/22
4, 120, 4/4/23, 17/6/23
5, 12, 6/8/23, 9/10/23
My question....how do I find the highest SeatimeID for each particular CrewID? I really want the query to return
3, 110, 12/2/22, 23/6/22
4, 120, 4/4/23, 17/6/23
5, 12, 6/8/23, 9/10/23
I've tried a few different ways to achieve this and I cannot seem to get it right?