Petal interview question

SQL aggregation and window function questions applied to a certain dataset