我有一个如下所示的表:
Name LastName tPoints aPoints sPoints gPoints type
John Johnny 15 14 13 10 1
Joe P. 12 11 26 10 1
Matt Q. 11 26 37 44 2
Sorine P. 55 9 8 7 2
Ali Ahmed 30 44 88 65 2
... ... .. .. .. .. 3
3
我想对 INDIVIDUAL ROWS 进行排序并根据TYPE
笔记:i can't use order by in oracle because it sorts only 1 row and the others
is sorted based on the first row
我不想将表格分成单独的表格,然后对其进行排序,然后将其更新回原始表格。
所以,输出看起来像这样,因为tPoints
- 我需要显示所有
15 - John Johnny
12 - Joe P.
并且对于aPoints
44 - Ali Ahmed
26 - Matt Q.
9 - Sorine P.
等等 ...
简而言之,如果 type = 1 则对 tPoints 进行降序排序,如果 type = 2 则对 aPoints 进行排序,如果 type = 3 则对 sPoints 进行排序,依此类推......
什么是韭菜的有效方法?
问候,