{ "data": { "question": { "questionId": "2852", "questionFrontendId": "2752", "categoryTitle": "Database", "boundTopicId": 2322212, "title": "Customers with Maximum Number of Transactions on Consecutive Days", "titleSlug": "customers-with-maximum-number-of-transactions-on-consecutive-days", "content": null, "translatedTitle": "在连续天数上进行了最多交易次数的顾客", "translatedContent": null, "isPaidOnly": true, "difficulty": "Hard", "likes": 0, "dislikes": 0, "isLiked": null, "similarQuestions": "[]", "contributors": [], "langToValidPlayground": null, "topicTags": [ { "name": "Database", "slug": "database", "translatedName": "数据库", "__typename": "TopicTagNode" } ], "companyTagStats": null, "codeSnippets": null, "stats": "{\"totalAccepted\": \"303\", \"totalSubmission\": \"722\", \"totalAcceptedRaw\": 303, \"totalSubmissionRaw\": 722, \"acRate\": \"42.0%\"}", "hints": [], "solution": null, "status": null, "sampleTestCase": "{\"headers\":{\"Transactions\":[\"transaction_id\",\"customer_id\",\"transaction_date\",\"amount\"]},\"rows\":{\"Transactions\":[[1,101,\"2023-05-01\",100],[2,101,\"2023-05-02\",150],[3,101,\"2023-05-03\",200],[4,102,\"2023-05-01\",50],[5,102,\"2023-05-03\",100],[6,102,\"2023-05-04\",200],[7,105,\"2023-05-01\",100],[8,105,\"2023-05-02\",150],[9,105,\"2023-05-03\",200]]}}", "metaData": "{\"mysql\":[\"Create table If Not Exists Transactions (transaction_id int, customer_id int, transaction_date date, amount int)\"],\"mssql\":[\"Create table Transactions (transaction_id int, customer_id int, transaction_date date, amount int)\"],\"oraclesql\":[\"Create table Transactions (transaction_id int, customer_id int, transaction_date date, amount int)\",\"ALTER SESSION SET nls_date_format='YYYY-MM-DD'\"],\"database\":true,\"name\":\"find_customers\",\"pythondata\":[\"Transactions = pd.DataFrame([], columns=['transaction_id', 'customer_id', 'transaction_date', 'amount']).astype({'transaction_id':'Int64', 'customer_id':'Int64', 'transaction_date':'datetime64[ns]', 'amount':'Int64'})\"],\"postgresql\":[\"Create table If Not Exists Transactions (transaction_id int, customer_id int, transaction_date date, amount int)\"],\"database_schema\":{\"Transactions\":{\"transaction_id\":\"INT\",\"customer_id\":\"INT\",\"transaction_date\":\"DATE\",\"amount\":\"INT\"}}}", "judgerAvailable": true, "judgeType": "large", "mysqlSchemas": [ "Create table If Not Exists Transactions (transaction_id int, customer_id int, transaction_date date, amount int)", "Truncate table Transactions", "insert into Transactions (transaction_id, customer_id, transaction_date, amount) values ('1', '101', '2023-05-01', '100')", "insert into Transactions (transaction_id, customer_id, transaction_date, amount) values ('2', '101', '2023-05-02', '150')", "insert into Transactions (transaction_id, customer_id, transaction_date, amount) values ('3', '101', '2023-05-03', '200')", "insert into Transactions (transaction_id, customer_id, transaction_date, amount) values ('4', '102', '2023-05-01', '50')", "insert into Transactions (transaction_id, customer_id, transaction_date, amount) values ('5', '102', '2023-05-03', '100')", "insert into Transactions (transaction_id, customer_id, transaction_date, amount) values ('6', '102', '2023-05-04', '200')", "insert into Transactions (transaction_id, customer_id, transaction_date, amount) values ('7', '105', '2023-05-01', '100')", "insert into Transactions (transaction_id, customer_id, transaction_date, amount) values ('8', '105', '2023-05-02', '150')", "insert into Transactions (transaction_id, customer_id, transaction_date, amount) values ('9', '105', '2023-05-03', '200')" ], "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\":{\"Transactions\":[\"transaction_id\",\"customer_id\",\"transaction_date\",\"amount\"]},\"rows\":{\"Transactions\":[[1,101,\"2023-05-01\",100],[2,101,\"2023-05-02\",150],[3,101,\"2023-05-03\",200],[4,102,\"2023-05-01\",50],[5,102,\"2023-05-03\",100],[6,102,\"2023-05-04\",200],[7,105,\"2023-05-01\",100],[8,105,\"2023-05-02\",150],[9,105,\"2023-05-03\",200]]}}",
"__typename": "QuestionNode"
}
}
}MySQL 8.0<\\/code><\\/p>\"],\"mssql\":[\"MS SQL Server\",\"