{ "data": { "question": { "questionId": "2315", "questionFrontendId": "2175", "boundTopicId": null, "title": "The Change in Global Rankings", "titleSlug": "the-change-in-global-rankings", "content": null, "translatedTitle": null, "translatedContent": null, "isPaidOnly": true, "difficulty": "Medium", "likes": 38, "dislikes": 14, "isLiked": null, "similarQuestions": "[]", "exampleTestcases": "{\"headers\": {\"TeamPoints\": [\"team_id\", \"name\", \"points\"], \"PointsChange\": [\"team_id\", \"points_change\"]}, \"rows\": {\"TeamPoints\": [[3, \"Algeria\", 1431], [1, \"Senegal\", 2132], [2, \"New Zealand\", 1402], [4, \"Croatia\", 1817]], \"PointsChange\": [[3, 399], [2, 0], [4, 13], [1, -22]]}}", "categoryTitle": "Database", "contributors": [], "topicTags": [ { "name": "Database", "slug": "database", "translatedName": null, "__typename": "TopicTagNode" } ], "companyTagStats": null, "codeSnippets": null, "stats": "{\"totalAccepted\": \"5.1K\", \"totalSubmission\": \"8.3K\", \"totalAcceptedRaw\": 5124, \"totalSubmissionRaw\": 8320, \"acRate\": \"61.6%\"}", "hints": [], "solution": null, "status": null, "sampleTestCase": "{\"headers\": {\"TeamPoints\": [\"team_id\", \"name\", \"points\"], \"PointsChange\": [\"team_id\", \"points_change\"]}, \"rows\": {\"TeamPoints\": [[3, \"Algeria\", 1431], [1, \"Senegal\", 2132], [2, \"New Zealand\", 1402], [4, \"Croatia\", 1817]], \"PointsChange\": [[3, 399], [2, 0], [4, 13], [1, -22]]}}", "metaData": "{\"mysql\": [\"Create table If Not Exists TeamPoints (team_id int, name varchar(100), points int)\", \"Create table If Not Exists PointsChange (team_id int, points_change int)\"], \"mssql\": [\"Create table TeamPoints (team_id int, name varchar(100), points int)\", \"Create table PointsChange (team_id int, points_change int)\"], \"oraclesql\": [\"Create table TeamPoints (team_id int, name varchar(100), points int)\", \"Create table PointsChange (team_id int, points_change int)\"], \"database\": true, \"name\": \"global_ratings_change\", \"pythondata\": [\"TeamPoints = pd.DataFrame([], columns=['team_id', 'name', 'points']).astype({'team_id':'Int64', 'name':'object', 'points':'Int64'})\", \"PointsChange = pd.DataFrame([], columns=['team_id', 'points_change']).astype({'team_id':'Int64', 'points_change':'Int64'})\"], \"postgresql\": [\"Create table If Not Exists TeamPoints (team_id int, name varchar(100), points int)\", \"Create table If Not Exists PointsChange (team_id int, points_change int)\"], \"database_schema\": {\"TeamPoints\": {\"team_id\": \"INT\", \"name\": \"VARCHAR(100)\", \"points\": \"INT\"}, \"PointsChange\": {\"team_id\": \"INT\", \"points_change\": \"INT\"}}}", "judgerAvailable": true, "judgeType": "large", "mysqlSchemas": [ "Create table If Not Exists TeamPoints (team_id int, name varchar(100), points int)", "Create table If Not Exists PointsChange (team_id int, points_change int)", "Truncate table TeamPoints", "insert into TeamPoints (team_id, name, points) values ('3', 'Algeria', '1431')", "insert into TeamPoints (team_id, name, points) values ('1', 'Senegal', '2132')", "insert into TeamPoints (team_id, name, points) values ('2', 'New Zealand', '1402')", "insert into TeamPoints (team_id, name, points) values ('4', 'Croatia', '1817')", "Truncate table PointsChange", "insert into PointsChange (team_id, points_change) values ('3', '399')", "insert into PointsChange (team_id, points_change) values ('2', '0')", "insert into PointsChange (team_id, points_change) values ('4', '13')", "insert into PointsChange (team_id, points_change) values ('1', '-22')" ], "enableRunCode": true, "enableTestMode": false, "enableDebugger": false, "envInfo": "{\"mysql\": [\"MySQL\", \"
MySQL 8.0
.
mssql server 2019
.
Oracle Sql 11.2
.
Python 3.10 with Pandas 2.0.2 and NumPy 1.25.0
\"], \"postgresql\": [\"PostgreSQL\", \"PostgreSQL 16
\"]}", "libraryUrl": null, "adminUrl": null, "challengeQuestion": null, "__typename": "QuestionNode" } } }