Amazon interview question

technical questions sql stuff using sql to solve real case