{ "data": { "question": { "questionId": "1317", "questionFrontendId": "1193", "boundTopicId": null, "title": "Monthly Transactions I", "titleSlug": "monthly-transactions-i", "content": null, "translatedTitle": null, "translatedContent": null, "isPaidOnly": true, "difficulty": "Medium", "likes": 109, "dislikes": 20, "isLiked": null, "similarQuestions": "[{\"title\": \"Monthly Transactions II\", \"titleSlug\": \"monthly-transactions-ii\", \"difficulty\": \"Medium\", \"translatedTitle\": null}]", "exampleTestcases": "{\"headers\":{\"Transactions\":[\"id\",\"country\",\"state\",\"amount\",\"trans_date\"]},\"rows\":{\"Transactions\":[[121,\"US\",\"approved\",1000,\"2018-12-18\"],[122,\"US\",\"declined\",2000,\"2018-12-19\"],[123,\"US\",\"approved\",2000,\"2019-01-01\"],[124,\"DE\",\"approved\",2000,\"2019-01-07\"]]}}", "categoryTitle": "Database", "contributors": [], "topicTags": [ { "name": "Database", "slug": "database", "translatedName": null, "__typename": "TopicTagNode" } ], "companyTagStats": null, "codeSnippets": null, "stats": "{\"totalAccepted\": \"22.2K\", \"totalSubmission\": \"33K\", \"totalAcceptedRaw\": 22216, \"totalSubmissionRaw\": 32988, \"acRate\": \"67.3%\"}", "hints": [], "solution": null, "status": null, "sampleTestCase": "{\"headers\":{\"Transactions\":[\"id\",\"country\",\"state\",\"amount\",\"trans_date\"]},\"rows\":{\"Transactions\":[[121,\"US\",\"approved\",1000,\"2018-12-18\"],[122,\"US\",\"declined\",2000,\"2018-12-19\"],[123,\"US\",\"approved\",2000,\"2019-01-01\"],[124,\"DE\",\"approved\",2000,\"2019-01-07\"]]}}", "metaData": "{\n \"mysql\": [\n \"Create table If Not Exists Transactions (id int, country varchar(4), state enum('approved', 'declined'), amount int, trans_date date)\"\n ],\n \"mssql\": [\n \"Create table Transactions (id int, country varchar(4), state varchar(10) check(state in ('approved', 'declined')), amount int, trans_date date)\"\n ],\n \"oraclesql\": [\n \"Create table Transactions (id int, country varchar(4), state varchar(10) check(state in ('approved', 'declined')), amount int, trans_date date)\",\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 (id int, country varchar(4), state enum('approved', 'declined'), amount int, trans_date date)", "Truncate table Transactions", "insert into Transactions (id, country, state, amount, trans_date) values ('121', 'US', 'approved', '1000', '2018-12-18')", "insert into Transactions (id, country, state, amount, trans_date) values ('122', 'US', 'declined', '2000', '2018-12-19')", "insert into Transactions (id, country, state, amount, trans_date) values ('123', 'US', 'approved', '2000', '2019-01-01')", "insert into Transactions (id, country, state, amount, trans_date) values ('124', 'DE', 'approved', '2000', '2019-01-07')" ], "enableRunCode": true, "enableTestMode": false, "enableDebugger": false, "envInfo": "{\"mysql\": [\"MySQL\", \"
MySQL 8.0
.
mssql server 2019
.
Oracle Sql 11.2
.