T-Mobile Interview Question

A simple SQL with follow up.