Find First Repeating Element Leetcode Sql