Amdocs interview question

2 queries of sql