Amazon Interview Question

The usual BI question and trivial live coding exersize