Mike

  You could try

     SELECT  MAX(datecolumn), patientnumber,testcode from sometable group by 
patientnumber, testcode, datecolumn

 

Buddy

 

From: [email protected] [mailto:[email protected]] On Behalf Of Michael J. 
Sinclair
Sent: Monday, October 12, 2015 8:23 PM
To: [email protected]
Subject: [RBASE-L] - extracting the most recent data

 

Hi all

 

I have a very long skinny table, 3 columns. 
A date, a patient number and test code.

 

I want to extract the rows that are the most recent test code for each patient.

 

If patient #3000 has had testcode # 80015 10 times over the last year, then I 
only want the most recent row for that testcode/patient combination

 

Is there a single command that can do that?

 

Mike

Reply via email to