0
這是我的表添加列獲得總和排名總
student_numbers
ROLL_NO NAME CLASS HINDI MATHS SCIENCE
2 amit 11 91 91 81
3 anirudh 11 88 87 81
4 akash 11 82 81 85
5 pratik 10 81 99 98
7 rekha 10 79 97 82
6 neha 10 89 91 90
8 kamal 10 66 68 69
1 ankit 11 97 98 87
我想最後三列,排名加到這個總按類劃分
這是什麼我試過
select roll_no,name,class,total,
rank() over (partition by class order by total desc) as rank
from student_numbers,(select hindi+maths+science total from student_numbers)
;
但這是顯示一個非常大的表,重複的學生名稱有不同的總數。
試着用更有意義的東西代替「不能正常工作」。 –