By admin | December 2, 2009

SAS Certified Adv Programmer 130 Questions (24)

Given the following SAS data set ONE:

ONE 
COUNTRY CITY   VISIT
USA     BOSTON 10
UK      LONDON 5
USA     DALLAS 10
UK      MARLOW 10
USA     BOSTON 20
UK      LONDON 15
USA     DALLAS 10

The following SAS program is submitted:

proc sql;
    select country, city, sum(visit) as TOTAL
        from one group by country, city order by country, total desc;
quit;

Which one of the following reports is generated?

A.

COUNTRY CITY   TOTAL 
UK      MARLOW 10
UK      LONDON 20
USA     BOSTON 50
USA     DALLAS 20

B.

COUNTRY CITY   TOTAL
UK      LONDON 20
UK      MARLOW 10
USA     BOSTON 50
USA     DALLAS 20

C.

COUNTRY CITY   TOTAL
USA     BOSTON 50

D.

COUNTRY CITY   TOTAL
UK      MARLOW 10
UK      LONDON 20
USA     DALLAS 20
USA     BOSTON 50 

3 comments | Add One

  1. admin - 12/2/2009 at 10:07 am

    B

  2. Kamal KC - 10/11/2012 at 11:15 pm

    USA Boston should be 30 instead of 50.

  3. Nuno - 11/7/2012 at 7:08 am

    Hello, this doesn’t seem possible at all. The correct answer should have 30 as a total for country USA/ city Boston. Never 50.

Leave a Comment

Leave a Reply

Your email address will not be published.