Multiple choice technology databases

Which of the following is the syntax for sorting the dataset in descending order

  1. proc sort data = Wegiht_Activa; by descending weight; run;

  2. proc sort data = Wegiht_Activa;descending by weight; run;

  3. proc sort data=Weight_Activa;weight by descending ;run

  4. B&C

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

In PROC SORT, the DESCENDING keyword is placed immediately before the variable name in the BY statement: 'by descending weight;'. Option A shows the correct syntax structure. Option B incorrectly places DESCENDING before BY, and Option C has invalid word order.