By admin | September 29, 2009

SAS Certified Base Programmer 123 Questions (92)

The following SAS program is submitted:

proc report data = sasuser.houses nowd headline headskip;
    column style price;
    where price <100000;
    <insert code here>
    title;
run;

Exhibit: output from the REPORT procedure.

Style     Price
RANCH     $64,000
SPLIT     $65,850
CONDO     $80,050
RANCH     $86,650
SPLIT     $94,450
SPLIT     $73,650
CONDO     $79,350
TWOSTORY  $55,850
RANCH     $89,100
TWOSTORY  $69,250
RANCH     $34,500

Assuming that the PRICE variable is numeric, which one of the following completes the program and produces the output displayed in the exhibit?

A.
define style / group 'Style';
define price / mean 'Price' format = dollar9.;

B.
define style / display 'Style';
define price / across 'Price' format = dollar9.;

C.
define style / display 'Style';
define price / sum 'Price' format = dollar9.;

D.
define style / order 'Style';
define price / mean 'Price' format = dollar9.;

3 comments | Add One

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

    C

  2. Panda - 01/29/2012 at 2:23 pm

    why are you using “sum” here? isn’t it B where you are defining price and across with a price format?

  3. new user - 03/16/2013 at 3:08 pm

    why we need SUM function in C since the result doesn’t include a SUM. Please can someone explain. thanks!

Leave a Comment

Leave a Reply

Your email address will not be published.