Amazon interview question

SQL questions using join and group LP BQ Leetcode