Home > Archive > Oracle Database discussion > May 2005 > Re: SQL Query









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: SQL Query
Tomislav Kokoska

2005-05-10, 7:23 am

select name, group, max(salary) over (partition by group order by salary
desc) max_salary from test


"jared" <jared@hwai.com> wrote in message
news:1111003625.538628.181650@o13g2000cwo.googlegroups.com...
> 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?
>



Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2009 droptable.com