Pergunta de entrevista da empresa DRW

SQL Questions about joins and looping and window functions.