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

Home -> Community -> Usenet -> comp.databases.theory -> Re: All hail Bob (not)!

Re: All hail Bob (not)!

From: <jiiiiim_at_hotmail.com>
Date: 7 May 2006 20:42:00 -0700
Message-ID: <1147059720.251520.287120@e56g2000cwe.googlegroups.com>


Frank Hamersley wrote:
> Bob Badour wrote:

[..]

>> I agree it is no problem to write the query to get the average ages
>> where the age is known. Using null, how does one write the query to
>> get the correct result, ie. the average is unknown ?


> select case when count(*) = count(age)
> then avg(age)
> else null
> end as avgage
> from table

What say you Bob? The silence to date has been most instructive.

Cheers, Frank. Received on Sun May 07 2006 - 22:42:00 CDT

Original text of this message

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