Lightweight Sql Problem In Leetcode Python