全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
1385 3
2013-08-28
Finess                           Siret                                Year                nobs
440015337            00568038400012            1997             1
440015337            00568038400012            1998             1
800002503            00572016400028            1997             1
800002503            00572016400028            1998             1
440016756            00687180000014            1997             1
760019554            01607121900014            1998             1
130780240            06180467000018            1997             2
130780075            06180467000018            1997             2
130780075            06180467000018            1998             2
130780240            06180467000018            1998             2
690802301            07080153500033            1997             2
690807086            07080153500033            1997             2
690807086            07080153500033            1998             1
270013543            22280001300015            1997             1
270013543            22280001300018            1998             1
280500612            22280001300018            1997             2
280502873            22280001300018            1998             2

nobs:每年每个siret拥有的finess数量(每个siret可以拥有一个或多个finess)

Q1:只保留两年间没有任何变化的siret和finess,比如:
440015337 00568038400012 1997 1
440015337 00568038400012 1998 1

data test1; set a;
if first.siret and last.siret then delete;
run;

Q2: 只保留1998年消失了的siret,也就是说这个siret之存在于1997年,1998年消失后,它原来拥有的finess被另一个siret收购(但是这个siret不是1998年新建立的,而是1997年就已经存在的),比如:
270013543 22280001300015 1997 1
270013543 22280001300018 1998 1

这个不知道怎么用SAS得到,请大侠帮帮忙,先谢谢啦!

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2013-8-28 07:31:52
复制代码
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2013-8-29 20:43:18
yongyitian 发表于 2013-8-28 07:31
谢谢 yongyitian
试了下Q2,可是SAS给我的提示是:
ERROR: Column finess could not be found in the table/view identified with the correlation name A.
ERROR: Column finess could not be found in the table/view identified with the correlation name B.
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2013-8-29 21:37:29
打开你的数据,在“finess“那栏点击右键,选取最后一个”column attributes“,查看这列真正的name是什么,有时候你的Finess仅仅只是label,找到名字以后,在sql步骤中相应替换所有的finess
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群