{ "data": { "question": { "questionId": "1974", "questionFrontendId": "1821", "categoryTitle": "Database", "boundTopicId": 715089, "title": "Find Customers With Positive Revenue this Year", "titleSlug": "find-customers-with-positive-revenue-this-year", "content": null, "translatedTitle": "寻找今年具有正收入的客户", "translatedContent": null, "isPaidOnly": true, "difficulty": "Easy", "likes": 5, "dislikes": 0, "isLiked": null, "similarQuestions": "[]", "contributors": [], "langToValidPlayground": null, "topicTags": [ { "name": "Database", "slug": "database", "translatedName": "数据库", "__typename": "TopicTagNode" } ], "companyTagStats": null, "codeSnippets": null, "stats": "{\"totalAccepted\": \"3.6K\", \"totalSubmission\": \"4K\", \"totalAcceptedRaw\": 3637, \"totalSubmissionRaw\": 4023, \"acRate\": \"90.4%\"}", "hints": [], "solution": null, "status": null, "sampleTestCase": "{\"headers\":{\"Customers\":[\"customer_id\",\"year\",\"revenue\"]},\"rows\":{\"Customers\":[[\"1\",\"2018\",\"50\"],[\"1\",\"2021\",\"30\"],[\"1\",\"2020\",\"70\"],[\"2\",\"2021\",\"-50\"],[\"3\",\"2018\",\"10\"],[\"3\",\"2016\",\"50\"],[\"4\",\"2021\",\"20\"]]}}", "metaData": "{\n \"mysql\": [\n \"Create table If Not Exists Customers (customer_id int, year int, revenue int)\"\n ],\n \"mssql\": [\n \"Create table Customers (customer_id int, year int, revenue int)\"\n ],\n \"oraclesql\": [\n \"Create table Customers (customer_id int, year int, revenue int)\"\n ],\n \"database\": true\n}", "judgerAvailable": true, "judgeType": "large", "mysqlSchemas": [ "Create table If Not Exists Customers (customer_id int, year int, revenue int)", "Truncate table Customers", "insert into Customers (customer_id, year, revenue) values ('1', '2018', '50')", "insert into Customers (customer_id, year, revenue) values ('1', '2021', '30')", "insert into Customers (customer_id, year, revenue) values ('1', '2020', '70')", "insert into Customers (customer_id, year, revenue) values ('2', '2021', '-50')", "insert into Customers (customer_id, year, revenue) values ('3', '2018', '10')", "insert into Customers (customer_id, year, revenue) values ('3', '2016', '50')", "insert into Customers (customer_id, year, revenue) values ('4', '2021', '20')" ], "enableRunCode": true, "envInfo": "{\"mysql\":[\"MySQL\",\"
\\u7248\\u672c\\uff1a mssql server 2019.<\\/p>\"],\"oraclesql\":[\"Oracle\",\" Oracle Sql 11.2.<\\/p>\"]}",
"book": null,
"isSubscribed": false,
"isDailyQuestion": false,
"dailyRecordStatus": null,
"editorType": "CKEDITOR",
"ugcQuestionId": null,
"style": "LEETCODE",
"exampleTestcases": "{\"headers\":{\"Customers\":[\"customer_id\",\"year\",\"revenue\"]},\"rows\":{\"Customers\":[[\"1\",\"2018\",\"50\"],[\"1\",\"2021\",\"30\"],[\"1\",\"2020\",\"70\"],[\"2\",\"2021\",\"-50\"],[\"3\",\"2018\",\"10\"],[\"3\",\"2016\",\"50\"],[\"4\",\"2021\",\"20\"]]}}",
"__typename": "QuestionNode"
}
}
}MySQL 8.0<\\/code><\\/p>\"],\"mssql\":[\"MS SQL Server\",\"