Rakuten interview question

SQL basics