IBM Interview Question

Easy python q, very easy sql q.