Hi,
I would rank the records, by subject:
SELECT a.subjectID, a.date, COUNT(*)
FROM myTable As a INNER JOIN myTable As b
ON a.subjectID=b.subjectID AND a.date <= b.date
GROUP BY a.subjectID, a.date
HAVING COUNT(*) IN(25, 50)
Indeed,
SELECT a.subjectID, a.date, b.date
FROM myTable As a INNER JOIN myTable As b
ON a.subjectID=b.subjectID AND a.date <= b.date
ORDER BY a.subjectID, a.date, b.date
will return 1 record, for a.subjectID having the minimum a.date value, for
that subject,
will return 2 records for the same subjectID with the next date value, and
so on.
Counting these records supply the rank, by subjectID, ordered by the date
value, ie, first, second, third, ...
You said we have to keep only those having a score of 25 or 50.
If you want the associated data, say, for the first 25 records, by subject:
SELECT a.subjectID, a.date, COUNT(*), LAST(a.otherField1),
LAST(a.otherField2), LAST(a.OtherField3)
FROM myTable As a INNER JOIN myTable As b
ON a.subjectID=b.subjectID AND a.date <= b.date
GROUP BY a.subjectID, a.date
HAVING COUNT(*) <=25
Hoping it may help,
Vanderghast, Access MVP