I need help coming up with the following query: My table:
+-------------+----------------------+ | rowID | dateOfPurchase | +-------------+----------------------+ | 1 | '2004-1-17 08:00:00' | +-------------+----------------------+ | 4 | '2004-1-17 08:03:20' | +-------------+----------------------+ | 1 | '2004-1-17 08:05:45' | +-------------+----------------------+ | 2 | '2004-1-17 08:07:11' | +-------------+----------------------+ | 1 | '2004-1-17 08:09:03' | +-------------+----------------------+ | 4 | '2004-1-17 08:11:56' | +-------------+----------------------+ | 1 | '2004-1-17 08:13:24' | +-------------+----------------------+ I would like to return all rowIDs that do not exist more than 3 times in the 08:00:00 - 09:00:00 hour of date '2004-1-17'. -->2,4 Thanks, John -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]