Netflix interview question

SQL questions on Partitioning and Aggregate.