{ "data": { "question": { "questionId": "1991", "questionFrontendId": "1841", "boundTopicId": null, "title": "League Statistics", "titleSlug": "league-statistics", "content": null, "translatedTitle": null, "translatedContent": null, "isPaidOnly": true, "difficulty": "Medium", "likes": 105, "dislikes": 97, "isLiked": null, "similarQuestions": "[]", "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]]}}", "categoryTitle": "Database", "contributors": [], "topicTags": [ { "name": "Database", "slug": "database", "translatedName": null, "__typename": "TopicTagNode" } ], "companyTagStats": null, "codeSnippets": null, "stats": "{\"totalAccepted\": \"12.4K\", \"totalSubmission\": \"23.3K\", \"totalAcceptedRaw\": 12436, \"totalSubmissionRaw\": 23273, \"acRate\": \"53.4%\"}", "hints": [], "solution": { "id": "2206", "canSeeDetail": true, "paidOnly": false, "hasVideoSolution": false, "paidOnlyVideo": true, "__typename": "ArticleNode" }, "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, "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" } } }