Dear stata users,
In my data I have id for parents ( pid) and id for children (cid). The parents are registred with one record, but In some cases, two parents are registred for the same child ( i.e. the child has two records in the data). In the analysis I will only use one parents and therefore I will select the parents in the couple that have attained most meetings. I would like to create a variable that select the parents with highest number on the variable “meetings” in those cases were there are two parents registered on the same child. Do anyone know how to create such a variable?
Many thanks

Data look like this:
pid cid meetings
1000 130 4
1001 130 8
1045 136 8
1046 136 3
1050 137 7
1060 144 1
1061 144 2
1093 172 1
1092 172 2
1096 180 5