> Peter wrote:
> So, what I need to do is get the average of a column ever x rows.

> This is as far as I got:
> SELECT AVG(value) AS every_ten_row_average FROM table GROUP BY [every 10
> rows]

> The part I'm stuck on is the [every 10 rows].

try this:

SELECT 10*FLOOR(X/10) as X, Avg(Y)
FROM table
GROUP BY 10*FLOOR(X/10)



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to