I have a database where for each person (ID), I need to calculate the most adverse score by weight (0 is worse than a 10) by section. See SectionRollup for expected value.
For each ID and SectionTitle, what score has the highest (max) weight?
For each ID and SectionTitle, what score has the highest (max) weight?
ID | SectionTitle | Score | Weight | SectionRollup |
1 | 1 | 3 | 3 | 8 |
1 | 1 | 8 | 8 | 8 |
1 | 2 | 0 | 11 | 0 |
1 | 3 | 3 | 3 | 3 |
2 | 1 | 2 | 2 | 10 |
2 | 1 | 10 | 10 | 10 |