{ "data": { "question": { "questionId": "1377", "questionFrontendId": "1241", "boundTopicId": null, "title": "Number of Comments per Post", "titleSlug": "number-of-comments-per-post", "content": null, "translatedTitle": null, "translatedContent": null, "isPaidOnly": true, "difficulty": "Easy", "likes": 167, "dislikes": 525, "isLiked": null, "similarQuestions": "[]", "exampleTestcases": "{\"headers\":{\"Submissions\":[\"sub_id\",\"parent_id\"]},\"rows\":{\"Submissions\":[[1,null],[2,null],[1,null],[12,null],[3,1],[5,2],[3,1],[4,1],[9,1],[10,2],[6,7]]}}", "categoryTitle": "Database", "contributors": [], "topicTags": [ { "name": "Database", "slug": "database", "translatedName": null, "__typename": "TopicTagNode" } ], "companyTagStats": null, "codeSnippets": null, "stats": "{\"totalAccepted\": \"32.7K\", \"totalSubmission\": \"50.1K\", \"totalAcceptedRaw\": 32712, \"totalSubmissionRaw\": 50068, \"acRate\": \"65.3%\"}", "hints": [], "solution": null, "status": null, "sampleTestCase": "{\"headers\":{\"Submissions\":[\"sub_id\",\"parent_id\"]},\"rows\":{\"Submissions\":[[1,null],[2,null],[1,null],[12,null],[3,1],[5,2],[3,1],[4,1],[9,1],[10,2],[6,7]]}}", "metaData": "{\"mysql\": [\"Create table If Not Exists Submissions (sub_id int, parent_id int)\"], \"mssql\": [\"Create table Submissions (sub_id int, parent_id int)\"], \"oraclesql\": [\"Create table Submissions (sub_id int, parent_id int)\"], \"database\": true, \"name\": \"count_comments\", \"pythondata\": [\"Submissions = pd.DataFrame([], columns=['sub_id', 'parent_id']).astype({'sub_id':'Int64', 'parent_id':'Int64'})\"], \"postgresql\": [\"\\nCreate table If Not Exists Submissions (sub_id int, parent_id int)\"], \"database_schema\": {\"Submissions\": {\"sub_id\": \"INT\", \"parent_id\": \"INT\"}}}", "judgerAvailable": true, "judgeType": "large", "mysqlSchemas": [ "Create table If Not Exists Submissions (sub_id int, parent_id int)", "Truncate table Submissions", "insert into Submissions (sub_id, parent_id) values ('1', 'None')", "insert into Submissions (sub_id, parent_id) values ('2', 'None')", "insert into Submissions (sub_id, parent_id) values ('1', 'None')", "insert into Submissions (sub_id, parent_id) values ('12', 'None')", "insert into Submissions (sub_id, parent_id) values ('3', '1')", "insert into Submissions (sub_id, parent_id) values ('5', '2')", "insert into Submissions (sub_id, parent_id) values ('3', '1')", "insert into Submissions (sub_id, parent_id) values ('4', '1')", "insert into Submissions (sub_id, parent_id) values ('9', '1')", "insert into Submissions (sub_id, parent_id) values ('10', '2')", "insert into Submissions (sub_id, parent_id) values ('6', '7')" ], "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" } } }