Databricks Interview Question

SQL questions involving window function