解法二:
select top 1 with ties courseno,avg(score) ‘平均分最高值‘--这里的with ties 就是为了解决相同排名的,找出排列相同的值
from tablename
group by courseno
order by 平均分最高值 desc
sql语句查询各门课程平均分的最大值
标签:相同 -- with avg des 了解 sql语句 desc group by
select top 1 with ties courseno,avg(score) ‘平均分最高值‘--这里的with ties 就是为了解决相同排名的,找出排列相同的值
from tablename
group by courseno
order by 平均分最高值 desc
sql语句查询各门课程平均分的最大值
标签:相同 -- with avg des 了解 sql语句 desc group by