[thelist] Calculating weighted averages

Bill Moseley moseley at hank.org
Sun Jul 15 11:51:54 CDT 2007


On Sun, Jul 15, 2007 at 07:07:26AM -0400, r937 wrote:
> > But ... AVG() is acting on just the non-null rows.
> 
> as per the spec, yes   

Yes.  It's amazing what a few hours of real sleep will do.

    SUM( CASE WHEN test.score IS NULL THEN 1 ELSE 0 END ) AS is_incomplete

-- 
Bill Moseley
moseley at hank.org




More information about the thelist mailing list