ElearnSAS.com

ElearnSAS.com
SAS Learning Platform

Base SAS 67

The SAS data set EMPLOYEE_INFO is listed below:
IDNumber Expenses
2542 100.00
3612 133.15
2198 234.34
2198 111.12
The following SAS program is submitted:
proc sort data = employee_info;

run;
Which one of the following BY statements completes the program and sorts the data sequentially by descending expense values within
each descending IDNUMBER value?
A. by descending IDNumber Expenses;
B. by (IDNumber Expenses) descending;
C. by IDNumber descending Expenses descending;
D. by descending IDNumber descending Expenses;
Click Comment link to get answer

16 comments:

  1. Anonymous7:38 AM

    Its D

    ReplyDelete
  2. Anonymous12:32 PM

    sort variables.

    ascending is default

    so
    Descending Var1 Descending var2

    ReplyDelete
  3. Anonymous1:59 AM

    D is the Ans

    ReplyDelete
  4. This comment has been removed by the author.

    ReplyDelete
  5. Anonymous7:15 AM

    Correct Ans is D

    For each variable we have to mention descending keyword before variable name.

    ReplyDelete
  6. you all wrong. its C. Refer to SAS here:
    http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/viewer.htm#a002473666.htm

    ReplyDelete
  7. Nops....you are wrong....in that example TOWN is sorted in ascending by default, then within TOWN- DEBT is sorted by descending, and then within TOWN & DEBT- ACCOUNTNUMBER is sorted by ascending. However sorting of accountnumber makes no difference because every record by TOWN & DEBT is unique. Let me know if you agree

    ReplyDelete