PACCAR Interview Question

SQL - window functions, Python logical thinking