Amdocs interview question

Joins Swl queries