| Date: | Thu, 2 May 2002 13:12:33 -0400 |
| Reply-To: | "Braten, Michael (Exchange)" <mbraten@BEAR.COM> |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | "Braten, Michael (Exchange)" <mbraten@BEAR.COM> |
| Subject: | Re: An SQL question. |
| Content-Type: | text/plain |
|---|
I think that SAS SQL is telling you that it did what you wanted, but not
efficiently. It had to make what can be
loosely be termed as a 'number of passes' to get the count . You are doing
a count by familyid, but you have workhrs
as part of the selection as well. SQL has to count the familyid , create a
familyid and nworkhrs dataset, and then merge it back on the selected row .
> -----Original Message-----
> From: Neal K Nair [SMTP:nnair@ACF.DHHS.GOV]
> Sent: Thursday, May 02, 2002 11:10 AM
> To: SAS-L@LISTSERV.UGA.EDU
> Subject: An SQL question.
>
> Hi SAS-Lers
>
> I have an SQL program as follows:
>
> proc sql;
> crate table three as
> select familyid, workhrs,count(*) as nworkhrs
> from two
> group by familyid;
> quit;
>
> [data set named 'two' contains the variables 'familyid' and 'workhrs',
> sorted
> by familyid and by descending order of workhrs]
>
> I get a NOTE in the SAS log: "The querry requires remerging summary
> statistics back with the original data".
> I do not understand the NOTE. Could someone explain it to me, please?
>
> Thanks.
>
> Neal
***********************************************************************
Bear Stearns is not responsible for any recommendation, solicitation,
offer or agreement or any information about any transaction, customer
account or account activity contained in this communication.
***********************************************************************
|