home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.databases.oracle      Overblown overpriced overengineered SHIT      2,288 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 2,093 of 2,288   
   Tomislav Kokoska to All   
   Re: SQL Query   
   10 May 05 11:21:19   
   
   From: tkokoska@varteks.com   
      
   select name,  group,  max(salary) over (partition by group order by salary   
   desc) max_salary from test   
      
      
   "jared"  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?   
   >   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca