Search the site...

SASCRUNCH TRAINING
  • Home
  • Member's Area
  • How to Start
  • SAS Interface
  • Creating a Data Set
  • Practical SAS Training Course
  • SAS Certified Specialist Training Program
  • Proc SQL Course
  • Introduction to Time Series Analysis
  • SAS Project Training Course
  • Full Training / Membership
  • Sign up
  • About us
  • Contact us
  • Home
  • Member's Area
  • How to Start
  • SAS Interface
  • Creating a Data Set
  • Practical SAS Training Course
  • SAS Certified Specialist Training Program
  • Proc SQL Course
  • Introduction to Time Series Analysis
  • SAS Project Training Course
  • Full Training / Membership
  • Sign up
  • About us
  • Contact us
Sentry Page Protection
Please Wait...
** Question 1 **;

proc sort data=sashelp.cars out=cars;
by make model msrp;
where make in ('Honda', 'Audi');
run;

data cars2;
set cars;
by make model msrp;
if first.make;
run;


** Question 2 **;
​

proc sort data=sashelp.prdsal2 out=prdsal2;
by country prodtype;
run;

data prdsal_all;
set prdsal2;
by country prodtype;
if first.prodtype then total=0;
total+actual;
if last.prodtype;
keep country prodtype total;
run;
Next
Already a member? Go to member's area.