Goldman Sachs interview question

Leetcode medium and hard for Python Basic SQL