I have a table named PatientsCertificationPeriods_HC with the following columns
ID- auto number
Subject - varchar
FromDate - DateTime
Now I need to get a list out of each patient, one record with subject 'SOC' and two records with subject "WG Recert", those two records should be the last two according to FromDate column.
(The SOC I want regardless of date, as there should not be more then one SOC per patient).
How can I accomplish that?
This can be done with either T-Sql or Access query.