How to find the arithmetic mean in mySQL database?

How to find the arithmetic mean in this SQL?

SELECT `stud`.`Name`
FROM `stud`
WHERE EXISTS(SELECT NumS
FROM `rob_gurt`
WHERE
 ((`stud`.`NumS` = `rob_gurt`.`NumS`) AND    (`rob_gurt`.`NumG` = 1)  AND ( `stud`.`E1`<=
 (`stud`.`E1` + `stud`.`E2` + `stud`.`E3`)/3) )
)

In this field
(stud.E1 + stud.E2 + stud.E3)/3) )
It should be on columns and on terms
Not all of the terms involved in the average

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.