Amazon interview question

Basic case scenarios in sql and partition bys