This problem cropped up before. Enrollment is in the database as a string. You can’t compare two strings that represent numbers and have them work mathematically. They work alphabetically which is going to be different than what you expect to happen. For example “2,000” is larger than “10,000” in the world of strings.
If your class can use libraries here is one that fixes the Enrollment column. C6OYfZDdnF_5vJ5YddKsKwOLbbUt8oQ3Dj_1WahVI2A
Here is a small example of using it Code.org - App Lab.
After you change the enrollment column to be a number you can change your program to compare it to numbers and it will work.