Count Good Numbers Leetcode Problems Sql Server