Ahh.. that, too :)

G'luck,
Peter

-- 
If I were you, who would be reading this sentence?

On Tue, May 22, 2001 at 12:04:34PM -0500, Cal Evans wrote:
> Select avg(id1) from <tableName> where id1 is not null; ?
> 
> ----- Original Message -----
> From: "Graeme B. Davis" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, May 22, 2001 11:29 AM
> Subject: Average of all NON-NULL columns in a ROW?
> 
> 
> > Is there a way to get the AVG of all specified NON-NULL columns in one
> row?
> > Right now I am doing this in a little script, but it would be nice if I
> > could do something like this:
> >
> > DATA
> > ---------
> > id1    0    4    4    NULL    3    NULL
> >
> > I want the average of 0,4,4,3 ie (0+4+4+3)/4
> >
> > is there a way to do this in a SELECT query?

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to