{ "data": { "question": { "questionId": "2335", "questionFrontendId": "2199", "categoryTitle": "Database", "boundTopicId": 1327188, "title": "Finding the Topic of Each Post", "titleSlug": "finding-the-topic-of-each-post", "content": null, "translatedTitle": "找到每篇文章的主题", "translatedContent": null, "isPaidOnly": true, "difficulty": "Hard", "likes": 6, "dislikes": 0, "isLiked": null, "similarQuestions": "[]", "contributors": [], "langToValidPlayground": null, "topicTags": [ { "name": "Database", "slug": "database", "translatedName": "数据库", "__typename": "TopicTagNode" } ], "companyTagStats": null, "codeSnippets": null, "stats": "{\"totalAccepted\": \"957\", \"totalSubmission\": \"1.6K\", \"totalAcceptedRaw\": 957, \"totalSubmissionRaw\": 1607, \"acRate\": \"59.6%\"}", "hints": [], "solution": null, "status": null, "sampleTestCase": "{\"headers\": {\"Keywords\": [\"topic_id\", \"word\"], \"Posts\": [\"post_id\", \"content\"]}, \"rows\": {\"Keywords\": [[1, \"handball\"], [1, \"football\"], [3, \"WAR\"], [2, \"Vaccine\"]], \"Posts\": [[1, \"We call it soccer They call it football hahaha\"], [2, \"Americans prefer basketball while Europeans love handball and football\"], [3, \"stop the war and play handball\"], [4, \"warning I planted some flowers this morning and then got vaccinated\"]]}}", "metaData": "{\"mysql\":[\"Create table If Not Exists Keywords (topic_id int, word varchar(25))\",\"Create table If Not Exists Posts (post_id int, content varchar(100))\"],\"mssql\":[\"Create table Keywords (topic_id int, word varchar(25))\",\"Create table Posts (post_id int, content varchar(100))\"],\"oraclesql\":[\"Create table Keywords (topic_id int, word varchar(25))\",\"Create table Posts (post_id int, content varchar(100))\"],\"database\":true,\"name\":\"find_topic\",\"pythondata\":[\"Keywords = pd.DataFrame([], columns=['topic_id', 'word']).astype({'topic_id':'Int64', 'word':'object'})\",\"Posts = pd.DataFrame([], columns=['post_id', 'content']).astype({'post_id':'Int64', 'content':'object'})\"],\"postgresql\":[\"Create table If Not Exists Keywords (topic_id int, word varchar(25))\",\"Create table If Not Exists Posts (post_id int, content varchar(100))\"],\"database_schema\":{\"Keywords\":{\"topic_id\":\"INT\",\"word\":\"VARCHAR(25)\"},\"Posts\":{\"post_id\":\"INT\",\"content\":\"VARCHAR(100)\"}}}", "judgerAvailable": true, "judgeType": "large", "mysqlSchemas": [ "Create table If Not Exists Keywords (topic_id int, word varchar(25))", "Create table If Not Exists Posts (post_id int, content varchar(100))", "Truncate table Keywords", "insert into Keywords (topic_id, word) values ('1', 'handball')", "insert into Keywords (topic_id, word) values ('1', 'football')", "insert into Keywords (topic_id, word) values ('3', 'WAR')", "insert into Keywords (topic_id, word) values ('2', 'Vaccine')", "Truncate table Posts", "insert into Posts (post_id, content) values ('1', 'We call it soccer They call it football hahaha')", "insert into Posts (post_id, content) values ('2', 'Americans prefer basketball while Europeans love handball and football')", "insert into Posts (post_id, content) values ('3', 'stop the war and play handball')", "insert into Posts (post_id, content) values ('4', 'warning I planted some flowers this morning and then got vaccinated')" ], "enableRunCode": true, "envInfo": "{\"mysql\":[\"MySQL\",\"
\\u7248\\u672c\\uff1a 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\": {\"Keywords\": [\"topic_id\", \"word\"], \"Posts\": [\"post_id\", \"content\"]}, \"rows\": {\"Keywords\": [[1, \"handball\"], [1, \"football\"], [3, \"WAR\"], [2, \"Vaccine\"]], \"Posts\": [[1, \"We call it soccer They call it football hahaha\"], [2, \"Americans prefer basketball while Europeans love handball and football\"], [3, \"stop the war and play handball\"], [4, \"warning I planted some flowers this morning and then got vaccinated\"]]}}",
"__typename": "QuestionNode"
}
}
}MySQL 8.0<\\/code><\\/p>\"],\"mssql\":[\"MS SQL Server\",\"