Mishipay interview question

Oops concept sql concept