Hi, Can anyone please help me with the following : I have data, where customers spending more than$100 is rewaded. I need to create 3 datasets(d1 d2 d3),the variable order_type indicates whether sale was retail(=1),catalog(=2),internet(=3).the variable total_retail_price is the amount the customer spends on each individual order. I need to create variable totsales to hold total sales to each customer by order_type.A customer can output to more than 1 dataset if he spents $100 or more in retail and internet. data s;
set blib.usorders04;
where total_retail_price>100;
run;
proc sort data=s out=s1;
by order_type;
run;
data d1 d2 d3;
set s1;
totsales=sum(total_retail_price);
by order_type;
if order_type=1 then output d1;
if order_type=2 then output d3;
if order_type=3 then output d3;
proc print data=d1;
run;
... View more