{ "data": { "question": { "questionId": "1991", "questionFrontendId": "1841", "categoryTitle": "Database", "boundTopicId": 745069, "title": "League Statistics", "titleSlug": "league-statistics", "content": null, "translatedTitle": "联赛信息统计", "translatedContent": null, "isPaidOnly": true, "difficulty": "Medium", "likes": 15, "dislikes": 0, "isLiked": null, "similarQuestions": "[]", "contributors": [], "langToValidPlayground": null, "topicTags": [ { "name": "Database", "slug": "database", "translatedName": "数据库", "__typename": "TopicTagNode" } ], "companyTagStats": null, "codeSnippets": null, "stats": "{\"totalAccepted\": \"3.2K\", \"totalSubmission\": \"6.1K\", \"totalAcceptedRaw\": 3151, \"totalSubmissionRaw\": 6056, \"acRate\": \"52.0%\"}", "hints": [], "solution": null, "status": null, "sampleTestCase": "{\"headers\":{\"Teams\":[\"team_id\",\"team_name\"],\"Matches\":[\"home_team_id\",\"away_team_id\",\"home_team_goals\",\"away_team_goals\"]},\"rows\":{\"Teams\":[[1,\"Ajax\"],[4,\"Dortmund\"],[6,\"Arsenal\"]],\"Matches\":[[1,4,0,1],[1,6,3,3],[4,1,5,2],[6,1,0,0]]}}", "metaData": "{\"mysql\":[\"Create table If Not Exists Teams (team_id int, team_name varchar(20))\",\"Create table If Not Exists Matches (home_team_id int, away_team_id int, home_team_goals int, away_team_goals int)\"],\"mssql\":[\"Create table Teams (team_id int, team_name varchar(20))\",\"Create table Matches (home_team_id int, away_team_id int, home_team_goals int, away_team_goals int)\"],\"oraclesql\":[\"Create table Teams (team_id int, team_name varchar(20))\",\"Create table Matches (home_team_id int, away_team_id int, home_team_goals int, away_team_goals int)\"],\"database\":true,\"name\":\"league_statistics\",\"pythondata\":[\"Teams = pd.DataFrame([], columns=['team_id', 'team_name']).astype({'team_id':'Int64', 'team_name':'object'})\",\"Matches = pd.DataFrame([], columns=['home_team_id', 'away_team_id', 'home_team_goals', 'away_team_goals']).astype({'home_team_id':'Int64', 'away_team_id':'Int64', 'home_team_goals':'Int64', 'away_team_goals':'Int64'})\"],\"postgresql\":[\"Create table If Not Exists Teams (team_id int, team_name varchar(20))\",\"Create table If Not Exists Matches (home_team_id int, away_team_id int, home_team_goals int, away_team_goals int)\"],\"database_schema\":{\"Teams\":{\"team_id\":\"INT\",\"team_name\":\"VARCHAR(20)\"},\"Matches\":{\"home_team_id\":\"INT\",\"away_team_id\":\"INT\",\"home_team_goals\":\"INT\",\"away_team_goals\":\"INT\"}}}", "judgerAvailable": true, "judgeType": "large", "mysqlSchemas": [ "Create table If Not Exists Teams (team_id int, team_name varchar(20))", "Create table If Not Exists Matches (home_team_id int, away_team_id int, home_team_goals int, away_team_goals int)", "Truncate table Teams", "insert into Teams (team_id, team_name) values ('1', 'Ajax')", "insert into Teams (team_id, team_name) values ('4', 'Dortmund')", "insert into Teams (team_id, team_name) values ('6', 'Arsenal')", "Truncate table Matches", "insert into Matches (home_team_id, away_team_id, home_team_goals, away_team_goals) values ('1', '4', '0', '1')", "insert into Matches (home_team_id, away_team_id, home_team_goals, away_team_goals) values ('1', '6', '3', '3')", "insert into Matches (home_team_id, away_team_id, home_team_goals, away_team_goals) values ('4', '1', '5', '2')", "insert into Matches (home_team_id, away_team_id, home_team_goals, away_team_goals) values ('6', '1', '0', '0')" ], "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\":{\"Teams\":[\"team_id\",\"team_name\"],\"Matches\":[\"home_team_id\",\"away_team_id\",\"home_team_goals\",\"away_team_goals\"]},\"rows\":{\"Teams\":[[1,\"Ajax\"],[4,\"Dortmund\"],[6,\"Arsenal\"]],\"Matches\":[[1,4,0,1],[1,6,3,3],[4,1,5,2],[6,1,0,0]]}}", "__typename": "QuestionNode" } } }