[Jean-Christophe Deschamps]

> You're going to have at most one random sample in every slice of 320
> s.  The GROUP BY clause will select only one for you and the query can
> be as simple as:
>
> select sample from from mytable group by timestamp / 320 order by
> timestamp;

Ah.  I didn't think of that.  It's even better than getting every nth
row, since I get one sample for a fixed period, which is what I really
want.  And yet better, I suppose I could do something like SELECT
min(sample), max(sample) FROM mytable GROUP BY timestamp / 3600 and
use financebars or similar in gnuplot to avoid missing the extremes in
the plot, making it appear more or less identical as if I had plotted
every value.

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

Reply via email to