View Single Post
  #2 (permalink)  
Old 11-29-2006, 05:51 PM
ben ben is offline
Administrator
 
Join Date: Mar 2007
Posts: 91
ben has disabled reputation
Default MySQL answer. Re: How to form Query for details given?

This should work with MS SQL as well

[sql]
SELECT empid FROM Emptable
WHERE datetime > (CURRENT_TIMESTAMP + INTERVAL '-7' DAY)
GROUP BY empid
HAVING count(empid) >= 5
[/sql]
Reply With Quote