id sales profit year size_group
a 36 9 1991 1
a 48 17 1992 1
a 25 7 1993 2
b 65 18 1991 1
b 30 8 1992 2
b 45 20 1993 1
Dear all
I have the above panel dataset for demonstration purpose and I would like to count the unique/ distinct ids in the size_group==1, during the year 1991. For example, in the year 1991, there are 2 unique ids(a,b) that comes under size_group==1.
I tried
Code:
count if size_group==1
But it is not what I really want. What should be the command?
Any help in this regard will be highly helpful