avatar
一个SAS sql的问题# Programming - 葵花宝典
w*a
1
All dates in 2011
Check status online via i-797 receipt number says i-797 approval sent June
16, waiting for the real mail to arrive now.
USCIS i-797 receipt mail received June 10
Recommendation Sent June 03, 2011
No Objection Statement Received May 27, 2011
Fee Received April 21, 2011
Form DS-3035 Received April 21, 2011
Form DS-2019 Received April 21, 2011
Passport Data Page Received April 21, 2011
Statement Of Reason Received April 21, 2011
Get a lot of help here and time to contribute some.
Good luck to everyone!
avatar
t*i
2
【 以下文字转载自 Statistics 讨论区 】
发信人: toni (toni), 信区: Statistics
标 题: 一个SAS sql的问题
发信站: BBS 未名空间站 (Mon Dec 30 16:18:39 2013, 美东)
刚接触SAS sql,有个问题求教:
现有2各表employees和bonus
employees表有列name, department, base_salary
bonus表有列year, department, bonus
现要用sql实现:返回employees表中所有的obs,用employees表中的department和year(
2012,2013)查询bonus表的bonus,给employees加上2列salary2012, salary2013
以下是我现有的一些code(不能同时返回2012和2013的total salary)
data employees;
input name $ dep $ base_salary;
datalines;
Charles Sales 70000
James HR 80000
Cindy HR 75000
Steven Sales 80000
;
data bonus;
input year dep $ bonus;
datalines;
2012 Sales 10000
2012 Marketing 12000
2012 HR 8000
2013 Sales 18000
2013 Marketing 20000
2013 HR 16000
;
proc sql;
select a.name, a.dep, a.base_salary, a.base_salary+b.bonus as salary2013
from employees a, bonus b where a.dep = b.dep and b.year=2013;
quit;
avatar
v*t
3
真的很快,比我3月份NOL收到approval还早!
avatar
s*o
4
一个笨办法:
proc sql;
create table sa2013 as
select a.name, a.dep, a.base_salary, a.base_salary+b.bonus as salary2013
from employees a, bonus b
where a.dep = b.dep and b.year=2013;
create table sa2012 as
select a.name, a.dep, a.base_salary+b.bonus as salary2012
from employees a, bonus b
where a.dep = b.dep and b.year=2012;
create table salary as
select c.*, d.salary2012
from sa2013 c, sa2012 d
where c.name=d.name and c.dep=d.dep;
quit;

【在 t**i 的大作中提到】
: 【 以下文字转载自 Statistics 讨论区 】
: 发信人: toni (toni), 信区: Statistics
: 标 题: 一个SAS sql的问题
: 发信站: BBS 未名空间站 (Mon Dec 30 16:18:39 2013, 美东)
: 刚接触SAS sql,有个问题求教:
: 现有2各表employees和bonus
: employees表有列name, department, base_salary
: bonus表有列year, department, bonus
: 现要用sql实现:返回employees表中所有的obs,用employees表中的department和year(
: 2012,2013)查询bonus表的bonus,给employees加上2列salary2012, salary2013

avatar
w*a
5
相信你也一定会有顺利的时候
我是急死了, 10月J1 就要到期。
2008年被裁员从H1 变得J-1, 或许是上天这回同情我

【在 v**t 的大作中提到】
: 真的很快,比我3月份NOL收到approval还早!
相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。