Login  Register

count problem

Posted by Christian Deindl on Apr 26, 2007; 3:14pm
URL: http://spssx-discussion.165.s1.nabble.com/count-problem-tp1075304.html

dear list members,

i have a supposingly simple problem, but unfourtenately i'm not able to
find my way through it.

i have a dataset with a person and a household id.

id      sampid
1       1104200032700
2       1104200032700
3       1104200057500
4       1104200057500
5       1104200181600
6       1104200181600
7       1104200213200
8       1104200235500
9       1104200235500
10      1104200245000



i want spss to simply count the different households so that i would get
a dataset that looks like the following

id      sampid
1       1
2       1
3       2
4       2
5       3
6       3
7       4
8       5
9       5
10      6


how can i do this?

Thanks in advance,

christian