Is there a way to do a RAND function but for a specific criteria?

For example, I have a database full of sport players. If a field in the database for each record is 'group', and for instance a group can be basketball,baseball,hockey. Is there a way to do a RAND function to grab a random record in my database that has the 'group' of 'baseball' ???

Thank You

EDIT: file i am working with
example.xlsx