Subject Counting only certain log events
Author

I have new way a user wants to pay for the software.


I have a log of when a user prints a report for a client. From the first log event, they can create as many reports for that client in 24 hours as they want, it is only counted as one. After 24 hours, any reports create count as an additional report and again, 24 hours to create another report. The basic data fields are:


PrintLog

  PrintLog_ID

  Event_DateTime

  Client_ID


The primary key uses PrintLog_ID exclusively, and a foreign key uses Client_ID. Event_DateTime is indexed


Any suggestions on how to create the SQL this? I'm guessing that it requires a stored proc. .


Ed Dressel