Desmond_Fox
Registered User.
- Local time
- Today, 23:31
- Joined
- Dec 3, 2014
- Messages
- 12
[Solved] Selecting the latest row for each year
Hi,
I'm trying to help my local school and I'm having trouble with a simple query. They have an access database with a table like this (simplified for this example):
--------------------------------
Name Result Date
--------------------------------
Bob 5 1/1/2014
Bob 6 2/2/2014*
Bob 7 3/3/2015
Bob 8 5/4/2015*
Len 5 1/1/2014
Len 6 2/2/2014*
Len 7 3/3/2015
Len 5 7/4/2015*
---------------------------------
Does anyone have any idea how I would write a query that gives me the latest result that each person earned in each year (to help I put a * symbol against the rows above that I am talking about)?
Bob 6 2/2/2014
Bob 8 5/4/2015
Len 6 2/2/2014
Len 5 7/4/2015
(The database is normalised and this table has an ID field, just in case anyone was wondering).
Any pointers in the right direction would be VERY welcome.
Des
Hi,
I'm trying to help my local school and I'm having trouble with a simple query. They have an access database with a table like this (simplified for this example):
--------------------------------
Name Result Date
--------------------------------
Bob 5 1/1/2014
Bob 6 2/2/2014*
Bob 7 3/3/2015
Bob 8 5/4/2015*
Len 5 1/1/2014
Len 6 2/2/2014*
Len 7 3/3/2015
Len 5 7/4/2015*
---------------------------------
Does anyone have any idea how I would write a query that gives me the latest result that each person earned in each year (to help I put a * symbol against the rows above that I am talking about)?
Bob 6 2/2/2014
Bob 8 5/4/2015
Len 6 2/2/2014
Len 5 7/4/2015
(The database is normalised and this table has an ID field, just in case anyone was wondering).
Any pointers in the right direction would be VERY welcome.
Des
Last edited: