Given the SAS data set SASUSER.HIGHWAY:
Steering Seatbelt Speed Status Count
-------- -------- ----- ------- -----
absent No 0-29 serious 31
absent No 0-29 not 1419
absent No 30-49 serious 191
absent no 30-49 not 2004
absent no 50+ serious 216
The following SAS program is submitted:
proc sql noprint;
select distinct Speed [_insert_SQL_clause_]
from SASUSER.HIGHWAY
;
quit;
title1 “Speed values represented are: &GROUPS”;
proc print data=SASUSER.HIGHWAY;
run;
Which SQL clause stores the text 0-29,30-49,50+ in the macro variable GROUPS?
A. into &GROUPS
B. into :GROUPS
C. into :GROUPS separated by ‘,’
D. into &GROUPS separated by ‘,
解析 B是把该列第一个变量付给宏变量group
C是把一整列付给宏变量group 用 ’ , '分隔