Simon Slavin-3 wrote: > > > SELECT minute,avg(watt) FROM samples GROUP BY minute > >
Thanks for the quick response! I could accomplish it that way but I would have to query many many times. My data has about 8000 records. The data looks like this for the minute and watts columns Minute Watt 1 100 2 110 3 111 4 95 5 120 6 90 7 15 8 220 It goes on like that for 8000+ records I want to average every four rows. So I could go select Avg(watts) from tblData where minute = 1 or minute =2 or minute =3 or minute = 4 But then I would have to do another statement for the next row like this: Avg(watts) from tblData where minute = 5 or minute = 6 or minute = 7 or minute = 8. This would result in 2000 records with "smoothed" data out of a 8000 row record set. My problem is that i need it to step every n number of rows (in this case 4) to get to the next set of data. -- View this message in context: http://old.nabble.com/Sampling-Data-tp26597669p26598244.html Sent from the SQLite mailing list archive at Nabble.com. _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

