please use scpoe and AVG in SQL