Carelon Interview Question

SQL query related to Window function