|Date: ||Fri, 19 Mar 2010 17:36:05 -0700|
|Reply-To: ||Patrick <patrick.matter@GMX.CH>|
|Sender: ||"SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>|
|From: ||Patrick <patrick.matter@GMX.CH>|
|Subject: ||Re: aggregate remaining obs /records SQL|
|Content-Type: ||text/plain; charset=ISO-8859-1|
I guess what you could do is creating an additional variable for the
'group by' statement.
This variable should contain a distinct value for the top 3 rows and
an identical value for all other rows.
Search the forum with "top sql" - there are already quite a few
threads around identifying "top" rows.
I would expect that you'll end up with a sub-select and a case