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 -- Igor Tandetnik _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users