What if the roster had several classes and you wanted to pick out top 1% from each class based on grades, how would you do that?

Thanks in advance.