![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
This is probably easy and I'm missing it because I'm a little sleep-deprived this month, but: given the following table 'test': name group salary ----- ----------- ------ unique medium cardinality How can I select the name(s) for each group that have the highest salary for that group? |
#3
| |||
| |||
|
|
This is not perfect, ecpecially if you have the same names having equal salary |
|
and that happens to be the max salary in the group, |
|
This is the result: Name MAX(SALARY) Alex 1000 Betty 5200 David 9000 |
#4
| |||
| |||
|
|
This is probably easy and I'm missing it because I'm a little sleep-deprived this month, but: given the following table 'test': name group salary ----- ----------- ------ unique medium cardinality How can I select the name(s) for each group that have the highest salary for that group? |
![]() |
| Thread Tools | |
| Display Modes | |
| |