LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (May 2008, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 16 May 2008 11:09:17 -0400
Reply-To:     Mark Smolkin <marksmolkin@GMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Mark Smolkin <marksmolkin@GMAIL.COM>
Subject:      SQL confusion
Content-Type: text/plain; charset=ISO-8859-1

Hi..I am fairly new to SQL and am confused by a sentence in the SAS 9.1 SQL Procedure User's Guide. The text below is from pg. 41 and I don't quite understand the second criteria mentioning the "where" clause. To examine it, I created fake data and I saw that I could use a summary function like "sum(cost)" as the lone item in the select clause, use a where clause that subsetted on an a separate variable, and still receive the correct overall sum without an error message. I am sure I am simply misinterpreting the sentence and so I was hoping somebody could set me straight....Appreciate the help!...

Mark

"In the previous example, PROC SQL combined information from multiple rows of data into a single row of output. Specifically, the world oil reserves for each country were combined to form a total for all countries. Combining, or rolling up, of rows occurs when

􀀀 the SELECT clause contains only columns that are specified within an aggregate function 􀀀 the WHERE clause, if there is one, contains only columns that are specified in the SELECT clause."


Back to: Top of message | Previous page | Main SAS-L page