When teaching a course with multiple sections, and especially when a course has a large number of students, using groups in conjunction with the gradebook makes it much easier to filter student data. Multi-section courses automatically have groups created for each section, and you can use these groups, or your own custom groups.
Click to read more: https://www.oit.umass.edu/support/moodle/sort-moodle-gradebook-using-groups