Re: how??
From: Steve Long <slong3_at_mediaone.net>
Date: Sat, 25 Aug 2001 02:44:03 GMT
Message-ID: <ThEh7.64$1s1.3186_at_typhoon.jacksonville.mediaone.net>
Date: Sat, 25 Aug 2001 02:44:03 GMT
Message-ID: <ThEh7.64$1s1.3186_at_typhoon.jacksonville.mediaone.net>
look up the "HAVING" clause in SQL
"Eun-jeong Jeon" <zeni_at_hananet.net> wrote in message
news:pCKfpkFLBHA.357_at_news2.sys.netsgo.com...
>
> I know ename, deptno and sal of employees who has minimum salary in their
> department.
> I use pair-wise subquery.
>
> SQL> select ename, deptno, sal
> 2 from emp
> 3 where (deptno, sal) in (select deptno, min(sal)
> 4 from emp
> 5 group by deptno);
>
>
> I want to know ename, deptno and sal
> of employees who are paid less than average salary in their deptartment.
>
> What should I do? please help me~~
>
>
>
>
Received on Sat Aug 25 2001 - 04:44:03 CEST