(Resolved) Select top10 problems
I have the following data structure
Date name value
1-jan-2006 abc 200
1-jan-2006 bcd 400
31-mar-2006 abc 700
so I will have lots of data for each day, what I need to do is find the the min and max sum(top 10 value per day) .. It is fairly trivial to get the top 10, but I am struggeling with how to get this data on a per day basis. I am using SQL.
I was thinking that I would need to loop through the data and create a temp table containing the sum of top ten values on a daily basis, then requery this table to find the min and max.
can anyone suggest the best way to do this. can it be done in one select statement?