Amdocs interview question

sql queries