I’ve got a table with 2 columns. The first one is the auto-increment one and the second holds some numeric value. I need to group rows in such a way: get N consecutive rows (using the auto-increment field), count average of corresponding numeric values and put this 1 new line to the other table. Can anyone help me with the GROUP BY statement?
Share
no need for group by ?
This will get groups of 5 rows and return the average of
2ndcol. Example http://www.sqlize.com/y4mTuDF1Cyavg() docs
edited as per comments