Drop duplicates by criteria :confused:

Hello, i want to drop duplicates, but using a criteria. For example i am working with a dataset who has id for a lot of student, but the same student can be in different school at the same time, so i must drop this duplicates but keeping the observation with higher
assistance. I try to use the command dups, but i am not capable to drop by a criteria.

Help please.