{ "data": { "question": { "questionId": "1377", "questionFrontendId": "1241", "categoryTitle": "Database", "boundTopicId": 39444, "title": "Number of Comments per Post", "titleSlug": "number-of-comments-per-post", "content": null, "translatedTitle": "每个帖子的评论数", "translatedContent": null, "isPaidOnly": true, "difficulty": "Easy", "likes": 52, "dislikes": 0, "isLiked": null, "similarQuestions": "[]", "contributors": [], "langToValidPlayground": null, "topicTags": [ { "name": "Database", "slug": "database", "translatedName": "数据库", "__typename": "TopicTagNode" } ], "companyTagStats": null, "codeSnippets": null, "stats": "{\"totalAccepted\": \"11.8K\", \"totalSubmission\": \"19.9K\", \"totalAcceptedRaw\": 11847, \"totalSubmissionRaw\": 19876, \"acRate\": \"59.6%\"}", "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, "envInfo": "{\"mysql\":[\"MySQL\",\"

\\u7248\\u672c\\uff1aMySQL 8.0<\\/code><\\/p>\"],\"mssql\":[\"MS SQL Server\",\"

mssql server 2019.<\\/p>\"],\"oraclesql\":[\"Oracle\",\"

Oracle Sql 11.2.<\\/p>\"],\"pythondata\":[\"Pandas\",\"

Python 3.10 with Pandas 2.0.2 and NumPy 1.25.0<\\/p>\"],\"postgresql\":[\"PostgreSQL\",\"

PostgreSQL 16<\\/p>\"]}", "book": null, "isSubscribed": false, "isDailyQuestion": false, "dailyRecordStatus": null, "editorType": "CKEDITOR", "ugcQuestionId": null, "style": "LEETCODE", "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]]}}", "__typename": "QuestionNode" } } }