Student/lecture latest query,

ariansman

Registered User.
Local time
Yesterday, 22:00
Joined
Apr 3, 2012
Messages
157
Lectures presented by all the students during the last year has been stored in a talbe named: studentlectures, with these fields : ID, studentname, lecturesubject, lecturedate
For example:
1, john, mathematics, 2/3/2012
2, jack, chemistry, 10/3/2012 ,
3,john, engineering, 15/3/2012
4,jack ,chemisty,20/3/2012
5,john,politics,30/3/2012
6,john,engineering, 15/4/2012
7,jack,politics,15/4/2012
We want a query to show the latest record for each student with a specific lecture. For the above example the result will be:
1, john, mathematics, 2/3/2012
4, jack , chemisty,20/3/2012
5,john, politics,30/3/2012
6, john, engineering, 15/4/2012
7, jack,politics,15/4/2012
Previous subject records by each student are not shown, and only the latest one is shown.
Thank you
 
Totals query Groupby studentname, group by lecturesubject, max of lecturedate

Brian
 
Thanks J , that's another one off my Christmas card list. I'm only glad it was simple actually so simple I wondered if I'd missed the point as the op has been around more than 5 minutes.

Brian
 
I still need to know the solution. any help with more detailed guidance to an un-expert dude is appreciated.
 
Since this thread started in April 2013, I have to wonder Why did you come back to it 5 years later still seeking an answer?
 
Looking for a different answer than post #2?

In SQL it would be something like
SELECT top 1
FROM studentlectures
ORDER BY lecturedate DESC
GROUP BY studentname, lecturesubject
 

Users who are viewing this thread

Back
Top Bottom