이름 |
성적1 |
성적2 |
성적3 |
성적4 |
성적5 |
AAA |
52 |
78 |
34 |
0 |
43 |
BBB |
46 |
54 |
75 |
65 |
24 |
CCC |
78 |
86 |
45 |
56 |
12 |
DDD |
53 |
77 |
13 |
44 |
67 |
EEE |
34 |
24 |
63 |
23 |
83 |
위와 같은 데이터가 있을 경우에
각 이름들의 최고 성적만을 모아서 순위를 정해서 아래와 같은 결과가 필요합니다.
순위 |
이름 |
최고성적 |
1 |
CCC |
86 |
2 |
EEE |
83 |
3 |
AAA |
78 |
4 |
DDD |
77 |
5 |
BBB |
75 |
쿼리로 한방에 날릴 수는 없을까요?
여러 필드중에서 가장 큰 값을 찾는 것이 좀 어렵네요.
|