IBM Interview Question

SQL question was not that difficult, like leetcode medium would cover it