ok, i have this in my .db
id | score | rating | slope
1 | 85 | 68.9 | 118
2 | 83 | 68.9 | 118
3 | 87 | 68.9 | 118
4 | 85 | 68.9 | 118
5 | 82 | 68.9 | 118
6 | 81 | 68.9 | 118
7 | 85 | 68.9 | 118
8 | 82 | 68.9 | 118
9 | 81 | 68.9 | 118
10 | 85 | 68.9 | 118
11 | 84 | 68.9 | 118
12 | 83 | 68.9 | 118
13 | 87 | 68.9 | 118
14 | 85 | 68.9 | 118
15 | 82 | 68.9 | 118
16 | 81 | 68.9 | 118
17 | 85 | 68.9 | 118
18 | 82 | 68.9 | 118
19 | 81 | 68.9 | 118
20 | 85 | 68.9 | 118
21 | 86 | 68.9 | 118
how can i do this:
1. find from the last/latest 20 records (in my case rounds, the range will be from ID 21 - ID 2)
2.pick the 10 lowest numbers (scores) from the 20 records
3. apply this formula ((score - rating) * 113 / slope * 0.96) to each of them
i.e.:
ID. 18 (82 - 68.9) * 113 / 118 * 0.96) = 12.0 (handicap)
ID. 19 (81 - 68.9) * 113 / 118 * 0.96) = 11.1 (handicap)
Until the 10th best scores...
4. do an AVERAGE on the "handicap"
thanks guys
id | score | rating | slope
1 | 85 | 68.9 | 118
2 | 83 | 68.9 | 118
3 | 87 | 68.9 | 118
4 | 85 | 68.9 | 118
5 | 82 | 68.9 | 118
6 | 81 | 68.9 | 118
7 | 85 | 68.9 | 118
8 | 82 | 68.9 | 118
9 | 81 | 68.9 | 118
10 | 85 | 68.9 | 118
11 | 84 | 68.9 | 118
12 | 83 | 68.9 | 118
13 | 87 | 68.9 | 118
14 | 85 | 68.9 | 118
15 | 82 | 68.9 | 118
16 | 81 | 68.9 | 118
17 | 85 | 68.9 | 118
18 | 82 | 68.9 | 118
19 | 81 | 68.9 | 118
20 | 85 | 68.9 | 118
21 | 86 | 68.9 | 118
how can i do this:
1. find from the last/latest 20 records (in my case rounds, the range will be from ID 21 - ID 2)
2.pick the 10 lowest numbers (scores) from the 20 records
3. apply this formula ((score - rating) * 113 / slope * 0.96) to each of them
i.e.:
ID. 18 (82 - 68.9) * 113 / 118 * 0.96) = 12.0 (handicap)
ID. 19 (81 - 68.9) * 113 / 118 * 0.96) = 11.1 (handicap)
Until the 10th best scores...
4. do an AVERAGE on the "handicap"
thanks guys

