{ "data": { "question": { "questionId": "1842", "questionFrontendId": "1699", "categoryTitle": "Database", "boundTopicId": 537266, "title": "Number of Calls Between Two Persons", "titleSlug": "number-of-calls-between-two-persons", "content": null, "translatedTitle": "两人之间的通话次数", "translatedContent": null, "isPaidOnly": true, "difficulty": "Medium", "likes": 66, "dislikes": 0, "isLiked": null, "similarQuestions": "[]", "contributors": [], "langToValidPlayground": null, "topicTags": [ { "name": "Database", "slug": "database", "translatedName": "数据库", "__typename": "TopicTagNode" } ], "companyTagStats": null, "codeSnippets": null, "stats": "{\"totalAccepted\": \"13.8K\", \"totalSubmission\": \"18.1K\", \"totalAcceptedRaw\": 13834, \"totalSubmissionRaw\": 18111, \"acRate\": \"76.4%\"}", "hints": [], "solution": null, "status": null, "sampleTestCase": "{\"headers\":{\"Calls\":[\"from_id\",\"to_id\",\"duration\"]},\"rows\":{\"Calls\":[[1,2,59],[2,1,11],[1,3,20],[3,4,100],[3,4,200],[3,4,200],[4,3,499]]}}", "metaData": "{\"mysql\":[\"Create table If Not Exists Calls (from_id int, to_id int, duration int)\"],\"mssql\":[\"Create table Calls (from_id int, to_id int, duration int)\"],\"oraclesql\":[\"Create table Calls (from_id int, to_id int, duration int)\"],\"database\":true,\"name\":\"number_of_calls\",\"pythondata\":[\"Calls = pd.DataFrame([], columns=['from_id', 'to_id', 'duration']).astype({'from_id':'Int64', 'to_id':'Int64', 'duration':'Int64'})\"],\"postgresql\":[\"\\nCreate table If Not Exists Calls (from_id int, to_id int, duration int)\"],\"database_schema\":{\"Calls\":{\"from_id\":\"INT\",\"to_id\":\"INT\",\"duration\":\"INT\"}}}", "judgerAvailable": true, "judgeType": "large", "mysqlSchemas": [ "Create table If Not Exists Calls (from_id int, to_id int, duration int)", "Truncate table Calls", "insert into Calls (from_id, to_id, duration) values ('1', '2', '59')", "insert into Calls (from_id, to_id, duration) values ('2', '1', '11')", "insert into Calls (from_id, to_id, duration) values ('1', '3', '20')", "insert into Calls (from_id, to_id, duration) values ('3', '4', '100')", "insert into Calls (from_id, to_id, duration) values ('3', '4', '200')", "insert into Calls (from_id, to_id, duration) values ('3', '4', '200')", "insert into Calls (from_id, to_id, duration) values ('4', '3', '499')" ], "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\":{\"Calls\":[\"from_id\",\"to_id\",\"duration\"]},\"rows\":{\"Calls\":[[1,2,59],[2,1,11],[1,3,20],[3,4,100],[3,4,200],[3,4,200],[4,3,499]]}}",
"__typename": "QuestionNode"
}
}
}MySQL 8.0<\\/code><\\/p>\"],\"mssql\":[\"MS SQL Server\",\"