Input 在sas中控制输入和输出
我有这个作业,但我的教授不是最擅长解释的。我不只是想要答案,而是要有人向我解释这一点。我完全迷路了 数据集orion.discount包含orion Star在其产品上运行的各种折扣信息。 部分猎户座折扣Input 在sas中控制输入和输出,input,sas,output,Input,Sas,Output,我有这个作业,但我的教授不是最擅长解释的。我不只是想要答案,而是要有人向我解释这一点。我完全迷路了 数据集orion.discount包含orion Star在其产品上运行的各种折扣信息。 部分猎户座折扣 Product_ID Start_Date End_Date Unit_Sales_Price Discount 210100100027 01MAY2011 31MAY2011 $17.99 70% 2101
Product_ID Start_Date End_Date Unit_Sales_Price Discount
210100100027 01MAY2011 31MAY2011 $17.99 70%
210100100030 01AUG2011 31AUG2011 $32.99 70%
210100100033 01AUG2011 31AUG2011 $161.99 70%
210100100034 01AUG2011 31AUG2011 $187.99 70%
210100100035 01MAY2011 31MAY2011 $172.99 70%
由于销售出色,2011年12月的所有折扣将在2012年7月重复。2011年12月和2012年7月的折扣都被称为“快乐假期促销”
验证结果。这看起来很简单。发布整个数据集,我会看看我是否能用解释产生你想要的结果。你必须向我们解释你在哪里迷路了。对于理解数据库的基本概念和术语的人来说,这看起来非常清楚。您所发布的内容——要求我们进一步扩展您整个任务的各个方面——远远超出了Stack Overflow的范围。欢迎使用Stack Overflow。请阅读并遵循帮助文档中的发布指南。在这里申请。StackOverflow不是编码或教程服务。
data extended; /* creates the work.extended dataset
drop unit_sales_price; /* drops the unit_sales_price from the dataset
set orion.discount; /* reads from the orion.discount dataset
where start_date = '01DEC2011'd; /* only those records where date matches
Promotion = 'Happy Holidays'; /* create new var
Season = 'Winter'; /* the data step reads in one record at a time
output; /* output the first record
Season = 'Summer'; /* change the value of season
Start_date = '01Jul2012'd; /* change the value of start and end date
End_date = '31Jul2012'd;
output; /* output second record