BOLD interview question

SQL Window Function question , and joins