Amdocs Interview Question

SQL queries were difficult