Well, not easy in a programming language - however, certainly an option. I was hoping that there would be some kind of break in sequence aggregation available (or a trick) in Sqlite. My problem I suspect is not so uncommon. I know that I can do this in INFO (an outdated database of ArcInfo) and I believe in SqlPlus (oracle?). Thanks again for the pointers. Prasad
On Tue, Aug 16, 2011 at 5:41 PM, Simon Slavin <slav...@bigfraud.org> wrote: > > On 16 Aug 2011, at 9:58pm, Anantha Prasad wrote: > > > The data is sorted by Longitude and then by Distance. Whenever there are > > repeated values of Distance within a Longitude, I want the Sum and Count > to > > be added and divided - for example, > > Here is the table: > > Longitude Distance AvgColz SumColz CountColz > > 71.0 10 50.0000 100 2 > > 71.0 10 92.8571 2600 28 > > 71.0 20 83.8710 5200 62 > > 71.0 20 82.6389 11900 144 > > 71.0 30 62.0425 2916 47 > > 71.0 30 81.7119 9642 118 > > 71.0 40 17.8723 840 47 > > 71.0 40 49.8868 2644 53 > > 71.0 50 8.5814 369 43 > > 71.0 60 5.0238 211 42 > > This is manipulation of data, and the way you want it done is not going to > be the way the next programmer is going to want it done. Whatever kind of > averaging or interpolation you want done, do it in your programming > language, either by pre-scanning your database and replacing what you find, > or by writing your own sum and count routines which understand what you want > done. > > Simon. > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users