AT&T Interview Question

Easy SQL and coding question for OA round.