Re: I need help on my new homework assignment it should be simpole for expieranced users

From: Zero_Cool <tex___ass_at_hotmail.com>
Date: 21 Sep 2001 13:48:02 -0700
Message-ID: <417312e0.0109211248.13dd97c9_at_posting.google.com>


thank you for your help but I still got a question is there any way to do this without a subquery?

"Tony Hunt" <tonster_at_bigpond.net.au> wrote in message news:<QOEq7.76712$bY5.366010_at_news-server.bigpond.net.au>...
> Something along the lines
>
> SELECT MAX(a.empid), MAX(b.empid)
> FROM emp a, emp b
> WHERE b.empip NOT IN (SELECT empid FROM emp GROUP BY salary HAVING
> MAX(salary))
>
>
> "Zero_Cool" <tex___ass_at_hotmail.com> wrote in message
> news:417312e0.0109201236.465a916a_at_posting.google.com...
> > hi all,
> >
> > ok here is my problem I need to get the two highest paid employees
> > frolm a table
> > without using a union I'm not sure but someone told me there is a
> > function or something that will return a certain amount of rows from a
> > group function like max(salary) but instead of getting just the max it
> > would return like the top 2 or whatever is needed
> > 1. Is there such a function?
> > 2. If so what is the syntax?
> > 3. Could you please leave me an example?
> >
> > man, I can not find anything like this anywhere any help would be
> > appreciated and if it is not to much trouble could i ask someone to
> > E-mail me anything realated
> > thanx in advance
Received on Fri Sep 21 2001 - 22:48:02 CEST

Original text of this message