Minimum Money Needed Leetcode Problems Sql Server