{ "data": { "question": { "questionId": "2516", "questionFrontendId": "2377", "boundTopicId": null, "title": "Sort the Olympic Table", "titleSlug": "sort-the-olympic-table", "content": null, "translatedTitle": null, "translatedContent": null, "isPaidOnly": true, "difficulty": "Easy", "likes": 34, "dislikes": 2, "isLiked": null, "similarQuestions": "[]", "exampleTestcases": "{\"headers\":{\"Olympic\":[\"country\",\"gold_medals\",\"silver_medals\",\"bronze_medals\"]},\"rows\":{\"Olympic\":[[\"China\",10,10,20],[\"South Sudan\",0,0,1],[\"USA\",10,10,20],[\"Israel\",2,2,3],[\"Egypt\",2,2,2]]}}", "categoryTitle": "Database", "contributors": [], "topicTags": [ { "name": "Database", "slug": "database", "translatedName": null, "__typename": "TopicTagNode" } ], "companyTagStats": null, "codeSnippets": null, "stats": "{\"totalAccepted\": \"4.7K\", \"totalSubmission\": \"6.1K\", \"totalAcceptedRaw\": 4721, \"totalSubmissionRaw\": 6064, \"acRate\": \"77.9%\"}", "hints": [], "solution": null, "status": null, "sampleTestCase": "{\"headers\":{\"Olympic\":[\"country\",\"gold_medals\",\"silver_medals\",\"bronze_medals\"]},\"rows\":{\"Olympic\":[[\"China\",10,10,20],[\"South Sudan\",0,0,1],[\"USA\",10,10,20],[\"Israel\",2,2,3],[\"Egypt\",2,2,2]]}}", "metaData": "{\"mysql\": [\"Create table If Not Exists Olympic (country varchar(50), gold_medals int, silver_medals int, bronze_medals int)\"], \"mssql\": [\"Create table Olympic (country varchar(50), gold_medals int, silver_medals int, bronze_medals int)\"], \"oraclesql\": [\"Create table Olympic (country varchar(50), gold_medals int, silver_medals int, bronze_medals int)\"], \"database\": true, \"name\": \"sort_table\", \"pythondata\": [\"Olympic = pd.DataFrame([], columns=['country', 'gold_medals', 'silver_medals', 'bronze_medals']).astype({'country':'object', 'gold_medals':'Int64', 'silver_medals':'Int64', 'bronze_medals':'Int64'})\"], \"postgresql\": [\"Create table If Not Exists Olympic (country varchar(50), gold_medals int, silver_medals int, bronze_medals int)\"], \"database_schema\": {\"Olympic\": {\"country\": \"VARCHAR(50)\", \"gold_medals\": \"INT\", \"silver_medals\": \"INT\", \"bronze_medals\": \"INT\"}}}", "judgerAvailable": true, "judgeType": "large", "mysqlSchemas": [ "Create table If Not Exists Olympic (country varchar(50), gold_medals int, silver_medals int, bronze_medals int)", "Truncate table Olympic", "insert into Olympic (country, gold_medals, silver_medals, bronze_medals) values ('China', '10', '10', '20')", "insert into Olympic (country, gold_medals, silver_medals, bronze_medals) values ('South Sudan', '0', '0', '1')", "insert into Olympic (country, gold_medals, silver_medals, bronze_medals) values ('USA', '10', '10', '20')", "insert into Olympic (country, gold_medals, silver_medals, bronze_medals) values ('Israel', '2', '2', '3')", "insert into Olympic (country, gold_medals, silver_medals, bronze_medals) values ('Egypt', '2', '2', '2')" ], "enableRunCode": true, "enableTestMode": false, "enableDebugger": false, "envInfo": "{\"mysql\": [\"MySQL\", \"

MySQL 8.0.

\"], \"mssql\": [\"MS SQL Server\", \"

mssql server 2019.

\"], \"oraclesql\": [\"Oracle\", \"

Oracle Sql 11.2.

\"], \"pythondata\": [\"Pandas\", \"

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" } } }