- * Example generated by -dataex-. To install: ssc install dataex
- clear
- input long stkcd int year str78 Position long StartDate
- 2 2007 "执行副总裁" 20010215
- 2 2007 "总裁" 20010215
- 2 2007 "副总经理" 20050728
- 2 2007 "执行副总裁" 20041026
- 2 2007 "执行副总裁" 20040804
- 2 2007 "执行副总裁" 20071026
- 2 2007 "执行副总裁" 20021207
- 2 2007 "执行副总裁" 20040305
- 2 2007 "执行副总裁" 20071026
- 2 2008 "执行副总裁" 20021207
- 2 2008 "执行副总裁" 20071026
- 2 2008 "执行副总裁" 20040804
- 2 2008 "副总经理" 20050728
- 2 2008 "执行副总裁" 20041026
- 2 2008 "执行副总裁" 20071026
- 2 2008 "执行副总裁" 20040305
- 2 2008 "总裁" 20010215
- 2 2008 "执行副总裁" 20010215
- end
我想要的是按公司,按年度,把每一年中StartDate小于“Position==总裁的StartDate”数据标记出来。