On Wednesday, 22 August, 2012 22:31, Igor Tandetnik wrote:

> Keith Medcalf <kmedc...@dessus.com> wrote:
> > Of course, your select simplifies to:
> >
> > select -round((select avg(close)
> >                from test2 b
> >               where b.tkid between a.tkid-26 and a.tkid-13),2)
> >  from test2 a
 
> No it doesn't. You cannot just subtract numerators of the two fractions
> (avg(x) is a fraction of sum(x)/count(x)) when their denominators are
> different. 1/2 + 1/3 != 2/5

Of course you are correct.  Back to remedial arithmetic I go ...

---
()  ascii ribbon campaign against html e-mail
/\  www.asciiribbon.org



_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to