Simon Slavin-3 wrote:
>
>
>> 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.
>
> Sure. It's called writing software.
>
Yes, I have this solved via software already. I pull in the whole result
then average them together before I put them in a strongly typed array. I
think I would get some speed gains if I could get it from just a sqlite
statement.
Simon Slavin-3 wrote:
>
> Work out a calculation you can do within SQLite which converts your
> minutes to one value for each four minutes. Perhaps some equivalent of
> int(minute/4) would do it. Then use this value for a GROUP BY clause.
>
> Simon.
>
Genius! I looked it up and here's the sqlite syntax incase anyone else runs
into this:
select CAST(workoutID/5 as integer) as myField
I haven't implemented this fully yet but it looks like it's going to work.
--
View this message in context:
http://old.nabble.com/Sampling-Data-tp26597669p26599354.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