EQS: How to find the AI that is the closest to the player

I guess in that case I could use a distance check condition? and then run the check on what AI is the closest?