Amdocs Interview Question

Few sql queries.