Following is my table:
PatientID|VisitID|Date|Accident|Diagnosis|Doctor
1 | 1 | | | |
1 | 2 | | | |
1 | 3 | | | |
Both PatientID
and VisitID
are composite primary keys. Now I want to show only the last record. In other words where PatientID
=1
and VisitID
=Maximum.
So what would the query be?