Codingame Sql Test Hackerrank Python Problem