这里的图片可以拖拽到一个新页面查看原图!!!!

 

 

这里有两个表,需要查询总成绩和排名

sql server统计总成绩和排名

Sql语句:

select ST.name,SE.Chinese,SE.Math,SE.English,
    ( SE.Chinese + SE.Math + SE.English ) as '总成绩',
    ROW_NUMBER()over(order by ( SE.Chinese + SE.Math +SE.English ) desc) as '排名'
     from Student ST left join Score SE on ST.id= SE.sId

有更好的写法请评论!

相关文章:

  • 2022-02-23
  • 2022-12-23
  • 2021-09-15
  • 2022-12-23
  • 2022-01-12
  • 2021-04-27
  • 2021-07-10
  • 2021-04-22
猜你喜欢
  • 2021-09-27
  • 2021-07-16
  • 2022-01-10
  • 2021-08-31
  • 2022-01-14
  • 2022-01-11
  • 2021-11-19
相关资源
相似解决方案