IBM Interview Question

SQL question and an easy coding question.