Sample Header Ad - 728x90

How to aggregate datapoints in a table?

2 votes
1 answer
201 views
Suppose I have following table - CREATE TABLE data_points (t DATETIME PRIMARY KEY, value INTEGER); I want to aggregate the data by calculating average of every 10 points in the table. i.e. If table has 20 data points the result is two aggregate points. 1st aggregate point the average of 1-10 data points, and 2nd of 11-20. Is this possible using a SQL query?
Asked by Kshitiz Sharma (3367 rep)
Dec 15, 2012, 08:13 AM
Last activity: Dec 20, 2017, 01:50 PM