Infogain Interview Question

question on joins and procedure