compare top 20 nos for different sr's

C

cliff

Hi john, thanks for help. You are great, Your option working wonderfully.
Now I small problem to compare result of top 20 with different last sr's and
display odd numbers. My data is something like this :_


sr numvalue cdate
10 14 10/26/2008
10 17 10/26/2008
9 18 10/26/2008
9 23 10/26/2008
8 35 10/25/2008
8 37 10/25/2008
7 6 10/25/2008
7 41 10/25/2008
I use following query to find out all numbers featured in last 3/4 sr's

SELECT a.sr, B.NumValue, (count(a.Numvalue)/5) AS Numcount, max(b.cdate) AS
latest, max(b.sr) AS lastsr
FROM [fast starta and end] AS a INNER JOIN [fast start and end] AS B ON
(B.SR+[p1]>=A.SR) AND (b.sr-a.sr<=[p1]) AND (b.sr<a.sr)
GROUP BY a.sr, B.NumValue
ORDER BY a.sr, (count(a.Numvalue)/5) DESC , max(b.sr) DESC , max(b.cdate)
DESC , b.numvalue;

I replace parameter [p1] value with 3/4 to get my result. then I use query
to select top 20 numbers

Now I want compare top 20 result from say last 3 sr's with top 20 result
from say last 4 sr's and I want display numbers not figured in top 20 of
last 3 sr's which are featured in last 4 sr's. how do I do it.


please help me out to solve this problem


thanks million


cliff
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top