Leetcode Insert Into Sql With Where Clause And Group