![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Given this table, named tblCUST: txtNAME intSCORE ====== ======== CARL 70 ALEX 50 BILL 55 ALEX 55 BILL 50 ALEX 70 ALEX 18 BILL 26 CARL 27 CARL 50 ALEX 25 CARL 55 BILL 28 CARL 38 What SQL statement will display the three (3) highest score values for each customer name – sorted ascending by name and then sorted descending by score? The result should look like this: ALEX 70 (highest) ALEX 55 (second highest) ALEX 50 (third highest) BILL 55 (highest) BILL 50 (second highest) BILL 28 (third highest) CARL 70 (highest) CARL 55 (second highest) CARL 50 (third highest) THANK YOU !! |
#3
| |||
| |||
|
#4
| |||
| |||
|
|
Given this table, named tblCUST: txtNAME intSCORE ====== ======== CARL 70 ALEX 50 BILL 55 ALEX 55 BILL 50 ALEX 70 ALEX 18 BILL 26 CARL 27 CARL 50 ALEX 25 CARL 55 BILL 28 CARL 38 What SQL statement will display the three (3) highest score values for each customer name ? sorted ascending by name and then sorted descending by score? The result should look like this: ALEX 70 (highest) ALEX 55 (second highest) ALEX 50 (third highest) BILL 55 (highest) BILL 50 (second highest) BILL 28 (third highest) CARL 70 (highest) CARL 55 (second highest) CARL 50 (third highest) THANK YOU !! |
#5
| |||
| |||
|
![]() |
| Thread Tools | |
| Display Modes | |
| |