Water Container Problem Leetcode Sql Queries