The SAS data set ONE contains fifty million observations and contains the variable
PRICE, QUANTITY, FIXED and VARIABLE. Which SAS program successfully creates three new variables TOTREV, TOTCOST and PROFIT and requires the least amount of CPU resources to be processed?
- data two;
Set one;
Where totrev>1000;
Totrev=sum(price*quantity);
Totcost=sum(fixed,variable);
Profit=sum(totrev,-totcost);
Run; - data two;
Set one;
totrev=sum(price*quantity);
where totrev>1000;
totcost=sum(fixed,variable);
profit=sum(totrev,-totcost);
run; - data two;
Set one;
Totrev=sum(price*quantity);
If totrev>1000;
Totcost=sum(fixed,variable);
Profit=sum(totrev,-totcost);
Run; - data two;
Set one;
Totrev = sum(price*quantity);
Totcost= sum(fixed,variable);
If totrev>1000;
Profit=sum(totrev,-totcost);
Run;
Reveal Solution Next Question