Eram Group interview question

Programming, Basics, Sql, Logical ques