By admin | September 29, 2009

SAS Certified Base Programmer 123 Questions (91)

The following SAS program is submitted:

proc report data = work.houses nowd;
    column style price;
    where prices <100000;
    <insert DEFINE statements here>
    title;
run;

Exhibit: the output from the REPORT procedure.

style     price
CONDO     80,050
          79,350
RANCH     64,000
          86,650
          89,100
          34,550
SPLIT     65,850
          94,450
          73,650
TWOSTORY  55,850
          69,250

Assume permanent variable labels have been assigned.
Which one of the following completes the program and produces the output displayed in the exhibit?

A.
define style / display width = 9;
define price / sum format = comma9. width = 10;

B.
define style / width = 9;
define price / sum format = comma9. width = 10;

C.
define style / group width = 9;
define price / sum format = comma9. width = 10;

D.
define style / order width = 9;
define price / sum format = comma9. width = 10;

9 comments | Add One

  1. admin - 09/29/2009 at 3:55 pm

    D

  2. yy - 07/18/2010 at 6:29 pm

    answer should be C. with ORDER, it displays all the values instead of grouping

  3. admin - 07/28/2010 at 2:37 pm

    @2 yy, please double check!

  4. Spk - 08/17/2010 at 7:17 pm

    Answer should be “C” as it only has Group By statement

  5. sameer - 04/21/2011 at 6:07 am

    C-its grouped by style.

  6. Sabee - 05/10/2011 at 2:04 pm

    Answer is D.

  7. tim - 08/18/2011 at 1:03 am

    please explain why it is ordered, not grouped,thanks

  8. cheryl - 08/19/2013 at 1:32 am

    if grouped by type, then each stype would sum up and get a total of price, such as:
    condo 159,400

  9. Lili - 07/25/2014 at 10:20 am

    “group” creates one row for each unique value of the variable, while “order” creates one row for each observation with rows arranged according to the values of the order variable. So the option is “order” here.

Leave a Comment

Leave a Reply

Your email address will not be published.