{ "data": { "question": { "questionId": "2208", "questionFrontendId": "2066", "boundTopicId": null, "title": "Account Balance", "titleSlug": "account-balance", "content": null, "translatedTitle": null, "translatedContent": null, "isPaidOnly": true, "difficulty": "Medium", "likes": 29, "dislikes": 1, "isLiked": null, "similarQuestions": "[]", "exampleTestcases": "{\"headers\":{\"Transactions\":[\"account_id\",\"day\",\"type\",\"amount\"]},\"rows\":{\"Transactions\":[[1,\"2021-11-07\",\"Deposit\",2000],[1,\"2021-11-09\",\"Withdraw\",1000],[1,\"2021-11-11\",\"Deposit\",3000],[2,\"2021-12-07\",\"Deposit\",7000],[2,\"2021-12-12\",\"Withdraw\",7000]]}}", "categoryTitle": "Database", "contributors": [], "topicTags": [ { "name": "Database", "slug": "database", "translatedName": null, "__typename": "TopicTagNode" } ], "companyTagStats": null, "codeSnippets": null, "stats": "{\"totalAccepted\": \"3.1K\", \"totalSubmission\": \"3.7K\", \"totalAcceptedRaw\": 3129, \"totalSubmissionRaw\": 3667, \"acRate\": \"85.3%\"}", "hints": [], "solution": null, "status": null, "sampleTestCase": "{\"headers\":{\"Transactions\":[\"account_id\",\"day\",\"type\",\"amount\"]},\"rows\":{\"Transactions\":[[1,\"2021-11-07\",\"Deposit\",2000],[1,\"2021-11-09\",\"Withdraw\",1000],[1,\"2021-11-11\",\"Deposit\",3000],[2,\"2021-12-07\",\"Deposit\",7000],[2,\"2021-12-12\",\"Withdraw\",7000]]}}", "metaData": "{\n \"mysql\": [\n \"Create table If Not Exists Transactions (account_id int, day date, type ENUM('Deposit', 'Withdraw'), amount int)\"\n ],\n \"mssql\": [\n \"Create table Transactions (account_id int, day date, type varchar(8) NOT NULL CHECK (type IN('Deposit', 'Withdraw')), amount int)\"\n ],\n \"oraclesql\": [\n \"Create table Transactions (account_id int, day date, type varchar(8) NOT NULL CHECK (type IN('Deposit', 'Withdraw')), amount int)\",\n \"ALTER SESSION SET nls_date_format='YYYY-MM-DD'\"\n ],\n \"database\": true\n}", "judgerAvailable": true, "judgeType": "large", "mysqlSchemas": [ "Create table If Not Exists Transactions (account_id int, day date, type ENUM('Deposit', 'Withdraw'), amount int)", "Truncate table Transactions", "insert into Transactions (account_id, day, type, amount) values ('1', '2021-11-07', 'Deposit', '2000')", "insert into Transactions (account_id, day, type, amount) values ('1', '2021-11-09', 'Withdraw', '1000')", "insert into Transactions (account_id, day, type, amount) values ('1', '2021-11-11', 'Deposit', '3000')", "insert into Transactions (account_id, day, type, amount) values ('2', '2021-12-07', 'Deposit', '7000')", "insert into Transactions (account_id, day, type, amount) values ('2', '2021-12-12', 'Withdraw', '7000')" ], "enableRunCode": true, "enableTestMode": false, "enableDebugger": false, "envInfo": "{\"mysql\": [\"MySQL\", \"

MySQL 8.0.

\"], \"mssql\": [\"MS SQL Server\", \"

mssql server 2019.

\"], \"oraclesql\": [\"Oracle\", \"

Oracle Sql 11.2.

\"]}", "libraryUrl": null, "adminUrl": null, "challengeQuestion": null, "__typename": "QuestionNode" } } }