Amdocs interview question

oops concept, basic sql queris and some puzzles