MSCI interview question

2 DSA 1 SQL questions 1 easy 1 medium