Rakuten interview question

SQL: normal join, window function