calculates average age of all students using 'select' method