Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: 2 count with criteria
"sit.sit" <gil.guerillot_at_ratp.fr> schrieb...
> I have one table EV
>
> EV_CODE PK
> EV_STATUS
> EV_CLASS
>
> I want 2 count in the same select:
> how many ev_code i have for each ev_class
> when ev_status is (A or R )
> and when ev_status is C
> result like ev_class A/R C
> X 58 15
> Y 22 47
>
> thanks
Hi sit.sit (funny name),
you can use SUM function on DECODEd fields.
That will do it.
Greetings,
Guido
Received on Tue Jul 02 2002 - 05:38:30 CDT
![]() |
![]() |