Amazon interview question

Easy/Medium leetcode sql livecode test.