Amdocs Interview Question

sql query