> 1. The average TIME ELAPSED between consecutive REPEATED instances of the
> rowID (GROUP BY rowID, I assume) between one month ago and now.

The easiest solution (if not the only) would be to handle this client side.

If you sort the records by their timestamp you can easily keep track of the
time between them and later on calculate the average interval.
The problem here is that you do not want statistics on individual records,
but you want statistics on data you calculate from two different records.
You could do a self join to combine records of the same table, but to
exclude the combination between row 1 and 3 is not trivial IMHO.

The client script can easily handle these things, since it receives the
records sequentially and so it can easily calculate differences between two
neighbouring records.

Regards, Jigal.


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

Reply via email to