I have the data in the following format
| score_count | score_value |
| 23 | 50 |
| 46 | 52 |
| 1 | 53 |
| 890 | 54 |
with more than a 1 million score_values, each value having its distinct count.
Given the data is in this format, how can I efficiently compute p95 or p99 of my the `score`.
I tried unrolling the table to create a single column with the value repeated multiple times, but the query does not complete at all.
Note that I'm planning to use this in a time chart command as so it has to be efficient to compute this value as well.