Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

Group by time range.

From: Chris W <2wsxdr5(at)cox.net>
Date: Tue Oct 30 2007 - 16:55:13 EDT


I have the following query...
SELECT CreateDate, count( * )
FROM `userprofile`
GROUP BY CreateDate

It isn't exactly what I want. Records are added to this table in 2 main ways. First people use the web site interface to create records. In this case, records are only added by one or 2 people and with a significant time between record inserts. The second way is through an import that reads data from a text file. In the second case the date on the records will all be close together with about 60 records added per second. What I want to do is find all the groups where the inserts all happened with in say 10 seconds. So my group by would be more like......

GROUP BY CreateDate +- 10 SECOND

Is there a way to do this?

--

Chris W
KE5GIX "Protect your digital freedom and privacy, eliminate DRM, learn more at http://www.defectivebydesign.org/what_is_drm"

Ham Radio Repeater Database.
http://hrrdb.com

--

MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=lists@pantek.com Received on Tue Oct 30 16:56:24 2007

This archive was generated by hypermail 2.1.8 : Thu Jul 03 2008 - 08:43:33 EDT

Do you need help?X

Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library