Amazon interview question

SQL questions, try solving leetcode