1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-01-11 02:58:13 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
leetcode-problemset/leetcode/originData/[no content]find-cumulative-salary-of-an-employee.json
2022-05-02 23:44:12 +08:00

75 lines
4.2 KiB
JSON

{
"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": 174,
"dislikes": 375,
"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.8K\", \"totalSubmission\": \"60K\", \"totalAcceptedRaw\": 25764, \"totalSubmissionRaw\": 60040, \"acRate\": \"42.9%\"}",
"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"
}
}
}