{ "data": { "question": { "questionId": "1153", "questionFrontendId": "1068", "categoryTitle": "Database", "boundTopicId": 7633, "title": "Product Sales Analysis I", "titleSlug": "product-sales-analysis-i", "content": null, "translatedTitle": "产品销售分析 I", "translatedContent": null, "isPaidOnly": true, "difficulty": "Easy", "likes": 24, "dislikes": 0, "isLiked": null, "similarQuestions": "[]", "contributors": [], "langToValidPlayground": null, "topicTags": [ { "name": "Database", "slug": "database", "translatedName": "数据库", "__typename": "TopicTagNode" } ], "companyTagStats": null, "codeSnippets": null, "stats": "{\"totalAccepted\": \"16.7K\", \"totalSubmission\": \"19.3K\", \"totalAcceptedRaw\": 16698, \"totalSubmissionRaw\": 19275, \"acRate\": \"86.6%\"}", "hints": [], "solution": null, "status": null, "sampleTestCase": "{\"headers\":{\"Sales\":[\"sale_id\",\"product_id\",\"year\",\"quantity\",\"price\"],\"Product\":[\"product_id\",\"product_name\"]},\"rows\":{\"Sales\":[[1,100,2008,10,5000],[2,100,2009,12,5000],[7,200,2011,15,9000]],\"Product\":[[100,\"Nokia\"],[200,\"Apple\"],[300,\"Samsung\"]]}}", "metaData": "{\n \"mysql\": [\n \"Create table If Not Exists Sales (sale_id int, product_id int, year int, quantity int, price int)\",\n \"Create table If Not Exists Product (product_id int, product_name varchar(10))\"\n ],\n \"mssql\": [\n \"Create table Sales (sale_id int, product_id int, year int, quantity int, price int)\",\n \"Create table Product (product_id int, product_name varchar(10))\"\n ],\n \"oraclesql\": [\n \"Create table Sales (sale_id int, product_id int, year int, quantity int, price int)\",\n \"Create table Product (product_id int, product_name varchar(10))\"\n ],\n \"database\": true\n}", "judgerAvailable": true, "judgeType": "large", "mysqlSchemas": [ "Create table If Not Exists Sales (sale_id int, product_id int, year int, quantity int, price int)", "Create table If Not Exists Product (product_id int, product_name varchar(10))", "Truncate table Sales", "insert into Sales (sale_id, product_id, year, quantity, price) values ('1', '100', '2008', '10', '5000')", "insert into Sales (sale_id, product_id, year, quantity, price) values ('2', '100', '2009', '12', '5000')", "insert into Sales (sale_id, product_id, year, quantity, price) values ('7', '200', '2011', '15', '9000')", "Truncate table Product", "insert into Product (product_id, product_name) values ('100', 'Nokia')", "insert into Product (product_id, product_name) values ('200', 'Apple')", "insert into Product (product_id, product_name) values ('300', 'Samsung')" ], "enableRunCode": true, "envInfo": "{\"mysql\":[\"MySQL\",\"

\\u7248\\u672c\\uff1aMySQL 8.0<\\/code><\\/p>\"],\"mssql\":[\"MS SQL Server\",\"

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\":{\"Sales\":[\"sale_id\",\"product_id\",\"year\",\"quantity\",\"price\"],\"Product\":[\"product_id\",\"product_name\"]},\"rows\":{\"Sales\":[[1,100,2008,10,5000],[2,100,2009,12,5000],[7,200,2011,15,9000]],\"Product\":[[100,\"Nokia\"],[200,\"Apple\"],[300,\"Samsung\"]]}}", "__typename": "QuestionNode" } } }