. use "C:\Documents and Settings\wang\桌面\08-11zonghe -\08-11zonghe - 副本.dta", clear
. list in 1/10
+------------------------+
| code date QFIIsh~e |
|------------------------|
1. | 1 4 1.10 |
2. | 2 1 0.65 |
3. | 2 2 0.71 |
4. | 2 5 1.26 |
5. | 2 5 0.63 |
|------------------------|
6. | 2 5 0.90 |
7. | 2 7 0.73 |
8. | 2 8 0.68 |
9. | 6 1 0.41 |
10. | 6 2 0.41 |
+------------------------+
. label drop _all
. list in 1/10
+------------------------+
| code date QFIIsh~e |
|------------------------|
1. | 1 4 111 |
2. | 2 1 66 |
3. | 2 2 72 |
4. | 2 5 127 |
5. | 2 5 64 |
|------------------------|
6. | 2 5 91 |
7. | 2 7 74 |
8. | 2 8 69 |
9. | 6 1 42 |
10. | 6 2 42 |
+------------------------+
. collapse (sum) QFIIshare , by( code date)
. list in 1/10
+------------------------+
| code date QFIIsh~e |
|------------------------|
1. | 1 4 111 |
2. | 2 1 66 |
3. | 2 2 72 |
4. | 2 5 282 |
5. | 2 7 74 |
|------------------------|
6. | 2 8 69 |
7. | 6 1 42 |
8. | 6 2 42 |
9. | 22 4 63 |
10. | 26 1 186 |
+------------------------+
.
|