Hi SAS experts, I am trying to know, for a given year&province&school, what’s the most common other school that people enrol, when they enrolled in multiple school in the same time. A quick example: What I have: id prov year school 1 29 2008 101 1 29 2008 102 2 35 2009 103 2 35 2009 104 2 35 2009 105 What I want: id prov year school school2 1 29 2008 101 102 1 29 2008 102 101 2 35 2009 103 104 2 35 2009 103 105 2 35 2009 104 103 2 35 2009 104 105 2 35 2009 105 103 2 35 2009 105 104 In the table “want”, there is an additional column “school2” to record the other school that this person enrolled in a given year. Greatly appreciate for any hints!
... View more