Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Multiple selects
"Rene Nyffenegger" <rene.nyffenegger_at_gmx.ch> wrote in message
news:bjaek1$gb9tu$1_at_ID-82536.news.uni-berlin.de...
> select
> count(
> case when
> this = 'that' and
> that = 'the other'
> then 1
> else null end) "Count 1",
> count(
> case when
> this = 'this' and
> that = 'that'
> then 1
> else null end) "Count 2",
> count(
> case when
> this = 'confusing'
> then 1
> else null end) "Count 3"
> from
> myTable;
NULLs in the solution are always better be avoided:
count(case when this = 'confusing' then 1else null end)
is
sum(case when this = 'confusing' then 1 else 0 end) Received on Fri Sep 05 2003 - 13:31:34 CDT
![]() |
![]() |