| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: script for "data value, count(data value)"
miker <mdent12_at_none.com> wrote in message news:<r1ln6uo9ck9s0kb682it561r4tkgoa0n3o_at_4ax.com>...
> I can't seem to get a script that will list the data elements as well
> as give me the count for those data elements from a table. A
> sub-select gives error about not returning single row. TIA
Miker, your problem description sounds like you should be using a group by claude:
UT1> select deptno, count(deptno)
2 from emp
3 group by deptno
4 /
DEPTNO COUNT(DEPTNO)
---------- -------------
10 3
20 5
30 6
HTH -- Mark D Powell -- Received on Thu Feb 14 2002 - 15:06:06 CST
![]() |
![]() |