Previous Row based on double where condition and group max sum

All we need is an easy explanation of the problem, so here it is. I have such a table and I would like to get these values: +───────────────────+────────+──────────+──────────────────────────────────────────────────────+ | TS…

Continue ReadingPrevious Row based on double where condition and group max sum