group by 묶은 내역에 평균을 구하여 처리할때는 avg() 함수를 사용하면된다
select user_id,avg(ext1) as avg from tablename where 1 group by user_id having 1 and avg(ext1)>='80' and avg(ext1)<='90' order by avg desc