SAS 2 lesson 2.10.level 1. For my code 400 orders are displayed. But the solution answer is only 10 orders for MID_Q4

11 views
Skip to first unread message

Thirumagal manivannan

unread,
Aug 6, 2014, 10:28:18 AM8/6/14
to anova...@googlegroups.com
Hi,
SAS 2 lesson 2.10.level 1. For my code 400 orders are displayed. But the solution answer is only 10 orders for MID_Q4.
My code
data Mid_Q4;
Set orion2.order_fact;
Where '01Nov2004'd <= Order_date <= '14dec2014'd;
Sales2Dte+Total_Retail_Price;
Num_orders+1;
run;


Title 'Orders from 01Nov2004 through 14Dec2004';
Proc print data = Mid_Q4;
format Sales2Dte Dollar10.2;
Var Order_ID Order_date Total_Retail_Price Sales2Dte Num_Orders;
run;
title;
Result for this code: 400 orders are displayed.
 But in in solution, 10 orders are only mentioned
I have attached my result screen shot.
Regards
Thiru

MidQ4 result.docx

sriaxmi brahmadevula

unread,
Aug 6, 2014, 7:12:10 PM8/6/14
to anova...@googlegroups.com
In Level2, 3. Read only the first 10 observations satisfying the where clause. So when you put obs=10 in the set statement you will only get 10 observations
Reply all
Reply to author
Forward
0 new messages