This content has been marked as final. Show 4 replies
I don't understand. The database doesn't have any rows that include the timestamp value of 2008-07-24 00:00:00
>How do I make a query that returns a timestamp value of exactly when the sum of
>POINTS recorded in the last 7 days is less than 5?
>It should come out to be 2008-07-24 00:00:00.
After midnight on the 24th, the sum would decrease to 4 points because the other 2-point record would no longer be within the 7-day range.
I want to make a query that will return the exact time that the sum would decrease to less than 5 points. And I'm pretty sure in this case that time would be 2008.07.24 00:00:01.
OK, I think I understand now. Will the timestamp ever include parts other than DD-MM-YY? That is, will it ever include HH-MM-SS that you would need to take into account for when the point value would 'expire'?
Preferably, I would like to have the time included as well.
I was trying to figure out a way to have it automatically figure out which record sets the sum higher than 5, then take the timestamp from that record and add 7 days.