By admin | January 13, 2010

SAS Certified Adv Programmer 130 Questions (49)

Given the following SAS data set ONE:

ONE 
LEVEL AGE
1     10
2     20
3     20
2     10
1     10
2     30
3     10
2     20
3     30
1     10

The following SAS program is submitted:

proc sql;
    select level, max(age) as MAX from one group by level having max(age) >
        (select avg(age) from one);
quit;

Which one of the following reports is generated?

A.

LEVEL AGE
2     20 
3     20

B.

LEVEL AGE
2     30 
3     30

C.

LEVEL MAX
2     20 
3     30

D.

LEVEL MAX
2     30
3     30

5 comments | Add One

  1. admin - 01/13/2010 at 12:06 pm

    D

  2. sathish - 02/24/2012 at 3:38 am

    B & D are same answers, so, both are correct

  3. mayank - 09/15/2013 at 1:59 pm

    you guys need to stop thinking that admin is stupid

  4. LHA84 - 12/16/2013 at 7:06 pm

    Only “D” is correct, as the variable name “AGE” is incorrect in option “B”.

  5. chinawokee - 07/9/2014 at 11:27 am

    B is not correct
    the variable name is age not max

Leave a Comment

Leave a Reply

Your email address will not be published. Required fields are marked *