Merkle Interview Question

Simple window function sum SQL question