Click on the Comments to view the Answers

Sunday, January 24, 2010

Base 28

A realtor has two customers. One customer wants to view a list of homes selling for less than $60,000. The other customer wants to view a list of homes selling for greater than $100,000. Assuming the PRICE variable is numeric, which one of the following PRINT procedure steps will select all desired observations?

A. proc print data = sasuser.houses;
where price lt 60000;
where price gt 100000;
run;


B. proc print data = sasuser.houses;
where price lt 60000 or price gt 100000;
run;


C. proc print data = sasuser.houses;
where price lt 60000 and price gt 100000;
run;


D. proc print data = sasuser.houses;
where price lt 60000 or where price gt 100000;
run;

7 comments:

SASGuru said...

Answer: B

Irfan Mohammad said...

It should be C.

kat said...

no it is B

siva said...

C

Kris RP said...

Ans B is correct.
In Ans A, 2nd where statement overrides the first where statement and produces only observations with price more than 100k.
Ans C is wrong because where clause is out of logic.
Ans D is wrong because of syntax error.


Maureen Letostak said...

It cannot be C because when using and both statements have to be true (i.e. price lt 60000 AND price gt 100000 at the same time) and since the price in both statements is the same, there is no possible price for which both statements is true...

Patrick said...

B

Post a Comment



Technology Top Blogs On our way to 1,000,000 rss feeds - millionrss.com Hihera.com Blog Directory - OnToplist.com blogarama - the blog directory Blog Directory
Disclaimer

SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration.

Other brand and product names are trademarks of their respective companies.

This blog is not responsible for any kind of copyright violation. This blog just collects the links hosted or posted by other servers/people/search engines.The creator of this page or the ISP(s) hosting any content on this site take no responsibility for the way you use the information provided on this site.If anybody has any copyright claim on it and doesn’t wish the information provided to be shown on our site, please do respond to this email. We shall remove them off immediately. Any inconvenience is regretted. Please do mention your exact grievance/problems with respect to certain third party links. We assure you that appropriate action will be taken off. Thank you