System Design Problem Leetcode Sql Window Functions Syntax In Sql