{ "data": { "question": { "questionId": "2441", "questionFrontendId": "2308", "boundTopicId": null, "title": "Arrange Table by Gender", "titleSlug": "arrange-table-by-gender", "content": null, "translatedTitle": null, "translatedContent": null, "isPaidOnly": true, "difficulty": "Medium", "likes": 70, "dislikes": 14, "isLiked": null, "similarQuestions": "[]", "exampleTestcases": "{\"headers\": {\"Genders\": [\"user_id\", \"gender\"]}, \"rows\": {\"Genders\": [[4, \"male\"], [7, \"female\"], [2, \"other\"], [5, \"male\"], [3, \"female\"], [8, \"male\"], [6, \"other\"], [1, \"other\"], [9, \"female\"]]}}", "categoryTitle": "Database", "contributors": [], "topicTags": [ { "name": "Database", "slug": "database", "translatedName": null, "__typename": "TopicTagNode" } ], "companyTagStats": null, "codeSnippets": null, "stats": "{\"totalAccepted\": \"4.6K\", \"totalSubmission\": \"6.7K\", \"totalAcceptedRaw\": 4592, \"totalSubmissionRaw\": 6722, \"acRate\": \"68.3%\"}", "hints": [], "solution": null, "status": null, "sampleTestCase": "{\"headers\": {\"Genders\": [\"user_id\", \"gender\"]}, \"rows\": {\"Genders\": [[4, \"male\"], [7, \"female\"], [2, \"other\"], [5, \"male\"], [3, \"female\"], [8, \"male\"], [6, \"other\"], [1, \"other\"], [9, \"female\"]]}}", "metaData": "{\"mysql\": [\"Create table If Not Exists Genders (user_id int, gender ENUM('female', 'other', 'male'))\"], \"mssql\": [\"Create table Genders (user_id int, gender VARCHAR(6) NOT NULL CHECK (gender IN ('female', 'other', 'male')))\"], \"oraclesql\": [\"Create table Genders (user_id int, gender VARCHAR(6) NOT NULL CHECK (gender IN ('female', 'other', 'male')))\"], \"database\": true, \"name\": \"arrange_table\", \"pythondata\": [\"Genders = pd.DataFrame([], columns=['user_id', 'gender']).astype({'user_id':'Int64', 'gender':'object'})\"], \"postgresql\": [\"Create table If Not Exists Genders (user_id int, gender VARCHAR(30) CHECK (gender IN ('female', 'other', 'male')))\\n\"], \"database_schema\": {\"Genders\": {\"user_id\": \"INT\", \"gender\": \"ENUM('female', 'other', 'male')\"}}}", "judgerAvailable": true, "judgeType": "large", "mysqlSchemas": [ "Create table If Not Exists Genders (user_id int, gender ENUM('female', 'other', 'male'))", "Truncate table Genders", "insert into Genders (user_id, gender) values ('4', 'male')", "insert into Genders (user_id, gender) values ('7', 'female')", "insert into Genders (user_id, gender) values ('2', 'other')", "insert into Genders (user_id, gender) values ('5', 'male')", "insert into Genders (user_id, gender) values ('3', 'female')", "insert into Genders (user_id, gender) values ('8', 'male')", "insert into Genders (user_id, gender) values ('6', 'other')", "insert into Genders (user_id, gender) values ('1', 'other')", "insert into Genders (user_id, gender) values ('9', 'female')" ], "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" } } }