Anghami interview question

Advanced SQL using window function and different clauses