Dandy (NY) Interview Question

SQL rolling window fucntion question, python/pandas question. The python question seemed more about figuring out the trick than knowing python. Getting to the solution in time allotted was the hardest part for each question.