|
Posted by Jim Moseby on 07/08/05 00:53
NC wrote:
> You'll have to do some client-side processing or, if you want
> to do everything server-side, create a temporary table and
> popultate it with current scores and week-ago scores...
>
> Cheers,
> NC
>
Thanks for the reply, NC. I was hoping to do this all server-side. A
temporary table is my first idea as well, but the SQL to populate it is
where I am struggling.
I need to find the score for each player NEAREST TO 7 days ago, and then
find the latest score for only those players who have an entry in that
time frame.
The problem is that not all players will have an entry for every day.
So, essentially, I need a baseline starting point for ALL players to
find out what their current score was at midnight, 7 days ago. Then I
need to find out which players score changed during the last 7 days, and
calculate the difference. Positive numbers are gains, negative are slides.
Any hints?
JM
[Back to original message]
|