Autodesk interview question

SQL window function and Python (straightforward)