Path: dp-news.maxwell.syr.edu!spool.maxwell.syr.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!postnews.google.com!e56g2000cwe.googlegroups.com!not-for-mail
From: jiiiiim@hotmail.com
Newsgroups: comp.databases.theory
Subject: Re: All hail Bob (not)!
Date: 7 May 2006 20:42:00 -0700
Organization: http://groups.google.com
Lines: 19
Message-ID: <1147059720.251520.287120@e56g2000cwe.googlegroups.com>
References: <444984d8$0$31637$e4fe514c@news.xs4all.nl>
   <lCf2g.63986$VV4.1197225@ursa-nb00s0.nbnet.nb.ca>
   <44498707$0$31637$e4fe514c@news.xs4all.nl>
   <tNr2g.1864$Ze.1251@trndny06>
   <Nft2g.64226$VV4.1206335@ursa-nb00s0.nbnet.nb.ca>
   <pcx2g.12844$vy1.5237@news-server.bigpond.net.au>
   <c8y2g.64385$VV4.1210756@ursa-nb00s0.nbnet.nb.ca>
   <rMG2g.13542$vy1.7467@news-server.bigpond.net.au>
   <WJL2g.64598$VV4.1223196@ursa-nb00s0.nbnet.nb.ca>
   <YHY2g.14245$vy1.10968@news-server.bigpond.net.au>
   <HC63g.65188$VV4.1237909@ursa-nb00s0.nbnet.nb.ca>
   <8go3g.15459$vy1.1811@news-server.bigpond.net.au>
   <GRq3g.65574$VV4.1249904@ursa-nb00s0.nbnet.nb.ca>
   <Z5E3g.16142$vy1.3861@news-server.bigpond.net.au>
   <SrL3g.66121$VV4.1263767@ursa-nb00s0.nbnet.nb.ca>
   <O0X3g.17127$vy1.4507@news-server.bigpond.net.au>
   <oek4g.17997$vy1.11003@news-server.bigpond.net.au>
NNTP-Posting-Host: 144.138.5.235
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
X-Trace: posting.google.com 1147059726 21365 127.0.0.1 (8 May 2006 03:42:06 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Mon, 8 May 2006 03:42:06 +0000 (UTC)
In-Reply-To: <oek4g.17997$vy1.11003@news-server.bigpond.net.au>
User-Agent: G2/0.2
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.0.3) Gecko/20060426 Firefox/1.5.0.3,gzip(gfe),gzip(gfe)
Complaints-To: groups-abuse@google.com
Injection-Info: e56g2000cwe.googlegroups.com; posting-host=144.138.5.235;
   posting-account=SljGYg0AAAAKGXiozJ2lwrE_Sc2IKaQ8
Xref: dp-news.maxwell.syr.edu comp.databases.theory:39294

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.

