1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-09-04 06:51:41 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
This commit is contained in:
2022-03-29 12:55:24 +08:00
parent 2b0511d272
commit b84ae535b7
3973 changed files with 51044 additions and 105065 deletions

View File

@@ -0,0 +1,75 @@
{
"data": {
"question": {
"questionId": "579",
"questionFrontendId": "579",
"boundTopicId": null,
"title": "Find Cumulative Salary of an Employee",
"titleSlug": "find-cumulative-salary-of-an-employee",
"content": null,
"translatedTitle": null,
"translatedContent": null,
"isPaidOnly": true,
"difficulty": "Hard",
"likes": 172,
"dislikes": 372,
"isLiked": null,
"similarQuestions": "[]",
"exampleTestcases": "{\"headers\":{\"Employee\":[\"id\",\"month\",\"salary\"]},\"rows\":{\"Employee\":[[1,1,20],[2,1,20],[1,2,30],[2,2,30],[3,2,40],[1,3,40],[3,3,60],[1,4,60],[3,4,70],[1,7,90],[1,8,90]]}}",
"categoryTitle": "Database",
"contributors": [],
"topicTags": [
{
"name": "Database",
"slug": "database",
"translatedName": null,
"__typename": "TopicTagNode"
}
],
"companyTagStats": null,
"codeSnippets": null,
"stats": "{\"totalAccepted\": \"25.2K\", \"totalSubmission\": \"59.3K\", \"totalAcceptedRaw\": 25206, \"totalSubmissionRaw\": 59339, \"acRate\": \"42.5%\"}",
"hints": [
"Seem hard at first glance? Try to divide this problem into some sub-problems. \r\nThink about how to calculate the cumulative sum of one employee, how to get the cumulative sum for many employees, and how to except the most recent month of the result.",
"Use the technique of self-join if you have only one table but to write a complex query.",
"Still remember how to use the function `sum` and `max`?"
],
"solution": {
"id": "207",
"canSeeDetail": true,
"paidOnly": false,
"hasVideoSolution": false,
"paidOnlyVideo": true,
"__typename": "ArticleNode"
},
"status": null,
"sampleTestCase": "{\"headers\":{\"Employee\":[\"id\",\"month\",\"salary\"]},\"rows\":{\"Employee\":[[1,1,20],[2,1,20],[1,2,30],[2,2,30],[3,2,40],[1,3,40],[3,3,60],[1,4,60],[3,4,70],[1,7,90],[1,8,90]]}}",
"metaData": "{\n \"mysql\": [\n \"Create table If Not Exists Employee (id int, month int, salary int)\"\n ],\n \"mssql\": [\n \"Create table Employee (id int, month int, salary int)\"\n ],\n \"oraclesql\": [\n \"Create table Employee (id int, month int, salary int)\"\n ],\n \"database\": true\n}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [
"Create table If Not Exists Employee (id int, month int, salary int)",
"Truncate table Employee",
"insert into Employee (id, month, salary) values ('1', '1', '20')",
"insert into Employee (id, month, salary) values ('2', '1', '20')",
"insert into Employee (id, month, salary) values ('1', '2', '30')",
"insert into Employee (id, month, salary) values ('2', '2', '30')",
"insert into Employee (id, month, salary) values ('3', '2', '40')",
"insert into Employee (id, month, salary) values ('1', '3', '40')",
"insert into Employee (id, month, salary) values ('3', '3', '60')",
"insert into Employee (id, month, salary) values ('1', '4', '60')",
"insert into Employee (id, month, salary) values ('3', '4', '70')",
"insert into Employee (id, month, salary) values ('1', '7', '90')",
"insert into Employee (id, month, salary) values ('1', '8', '90')"
],
"enableRunCode": true,
"enableTestMode": false,
"enableDebugger": false,
"envInfo": "{\"mysql\": [\"MySQL\", \"<p><code>MySQL 8.0</code>.</p>\"], \"mssql\": [\"MS SQL Server\", \"<p><code>mssql server 2019</code>.</p>\"], \"oraclesql\": [\"Oracle\", \"<p><code>Oracle Sql 11.2</code>.</p>\"]}",
"libraryUrl": null,
"adminUrl": null,
"challengeQuestion": null,
"__typename": "QuestionNode"
}
}
}