Given the following data at WORK DEMO:Which SAS program prints only the first 5 males in this order from the data set?

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

Given the following data at WORK DEMO:Which SAS program prints only the first 5 males in this order from the data set?

Post by answerhappygod »

Given the following data at WORK DEMO:Which SAS program prints only the first 5 males in this order from the data set?

A. proc sort data=WORK.DEMO out=out; by sex; run; proc print data= out (obs=5); run;
B. proc print data=WORK.DEMO(obs=5); where Sex='M'; run;
C. proc print data=WORK.DEMO(where=(sex='M')); where obs<=5; run;
D. proc sort data=WORK.DEMO out=out; by sex descending; run; proc print data= out (obs=5); run;
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!

This topic has 1 reply

You must be a registered member and logged in to view the replies in this topic.


Register Login
 
Post Reply