Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: SQL: How Many Diff JOBs for each ENAME

Re: SQL: How Many Diff JOBs for each ENAME

From: Maxim Demenko <mdemenko_at_arcor.de>
Date: Tue, 14 Nov 2006 18:16:42 +0100
Message-ID: <4559fa68$0$30329$9b4e6d93@newsspool1.arcor-online.net>


klabu schrieb:
> Using ONLY the structure of EMP as example,
>
> I have many, many employees in EMP and ENAME is not unique of course.....
> How to find HOW MANY DIFFERENT JOBs for each ENAME (non-key)
>
> 10gR2
>
> thanks
>
>
>

Either this is as simply as
SELECT COUNT(DISTINCT job),ename
FROM emp
GROUP BY ename;

or i didn't undertstand your question.

Best regards

Maxim Received on Tue Nov 14 2006 - 11:16:42 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US