C
cliff
I have the following data
sr no1. no2. no.3 no.4 no.5 no.6
1 1 8 11 25 30 32
2 4 8 19 28 30 45
3 7 14 20 31 35 39
4 4 12 15 20 43 48
5 9 16 21 22 26 36
6 5 17 28 29 31 47
7 20 13 15 30 33 32
8 11 15 16 25 26 49
9 25 32 36 39 40 44
10 5 6 17 20 27 43
11 35 37 38 40 45 47
12 25 27 28 38 39 45
13 8 11 15 32 46 18
I need to calculate top 10 numbers drawn in last 10 records from 11th
sr.no. onwards and how many of such nos are equal to 11th sr.no. onwards
for eg upto 10 sr.no./record 20 appears 4 times, 25,15,30 3 times and
4,5,8,11,16,17,26,28,31,32,36,39,43 twice.
so 10 top nos will be 20,25,15,30,3,4,5,8,11,16. however, none of them
appears in 11th record , which will be value of field called hot10 on 11 th
record . I would like to write query to calculate the above result for all
records (based on 10 previous records) and insert value into field called
hot 10 i.e,
please help me out to achieve the ojective
thanks
sr no1. no2. no.3 no.4 no.5 no.6
1 1 8 11 25 30 32
2 4 8 19 28 30 45
3 7 14 20 31 35 39
4 4 12 15 20 43 48
5 9 16 21 22 26 36
6 5 17 28 29 31 47
7 20 13 15 30 33 32
8 11 15 16 25 26 49
9 25 32 36 39 40 44
10 5 6 17 20 27 43
11 35 37 38 40 45 47
12 25 27 28 38 39 45
13 8 11 15 32 46 18
I need to calculate top 10 numbers drawn in last 10 records from 11th
sr.no. onwards and how many of such nos are equal to 11th sr.no. onwards
for eg upto 10 sr.no./record 20 appears 4 times, 25,15,30 3 times and
4,5,8,11,16,17,26,28,31,32,36,39,43 twice.
so 10 top nos will be 20,25,15,30,3,4,5,8,11,16. however, none of them
appears in 11th record , which will be value of field called hot10 on 11 th
record . I would like to write query to calculate the above result for all
records (based on 10 previous records) and insert value into field called
hot 10 i.e,
please help me out to achieve the ojective
thanks