{ "data": { "question": { "questionId": "3282", "questionFrontendId": "2985", "categoryTitle": "Database", "boundTopicId": 2586418, "title": "Calculate Compressed Mean", "titleSlug": "calculate-compressed-mean", "content": null, "translatedTitle": "计算订单平均商品数量", "translatedContent": null, "isPaidOnly": true, "difficulty": "Easy", "likes": 0, "dislikes": 0, "isLiked": null, "similarQuestions": "[]", "contributors": [], "langToValidPlayground": null, "topicTags": [ { "name": "Database", "slug": "database", "translatedName": "数据库", "__typename": "TopicTagNode" } ], "companyTagStats": null, "codeSnippets": null, "stats": "{\"totalAccepted\": \"720\", \"totalSubmission\": \"857\", \"totalAcceptedRaw\": 720, \"totalSubmissionRaw\": 857, \"acRate\": \"84.0%\"}", "hints": [], "solution": null, "status": null, "sampleTestCase": "{\"headers\":{\"Orders\":[\"order_id\",\"item_count\",\"order_occurrences\"]},\"rows\":{\"Orders\":[[10,1,500],[11,2,1000],[12,3,800],[13,4,1000]]}}", "metaData": "{\"mysql\":[\"Create Table if Not Exists Orders ( order_id int, item_count int, order_occurrences int)\"],\"mssql\":[\"Create Table Orders ( order_id int, item_count int, order_occurrences int)\"],\"oraclesql\":[\"Create Table Orders ( order_id int, item_count int, order_occurrences int)\"],\"database\":true,\"name\":\"compressed_mean\",\"postgresql\":[\"CREATE TABLE Orders (\\n order_id SERIAL PRIMARY KEY,\\n item_count INT,\\n order_occurrences INT\\n);\\n\"],\"pythondata\":[\"Orders = pd.DataFrame([], columns=['order_id', 'item_count', 'order_occurrences']).astype({'order_id':'Int64', 'item_count':'Int64', 'order_occurrences':'Int64'})\\n\"],\"database_schema\":{\"Orders\":{\"order_id\":\"INT\",\"item_count\":\"INT\",\"order_occurrences\":\"INT\"}}}", "judgerAvailable": true, "judgeType": "large", "mysqlSchemas": [ "Create Table if Not Exists Orders ( order_id int, item_count int, order_occurrences int)", "Truncate table Orders", "insert into Orders (order_id, item_count, order_occurrences) values ('10', '1', '500')", "insert into Orders (order_id, item_count, order_occurrences) values ('11', '2', '1000')", "insert into Orders (order_id, item_count, order_occurrences) values ('12', '3', '800')", "insert into Orders (order_id, item_count, order_occurrences) values ('13', '4', '1000')" ], "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.2.2 and NumPy 1.26.4<\\/p>\"],\"postgresql\":[\"PostgreSQL\",\" PostgreSQL 16<\\/p>\"]}",
"book": null,
"isSubscribed": false,
"isDailyQuestion": false,
"dailyRecordStatus": null,
"editorType": "CKEDITOR",
"ugcQuestionId": null,
"style": "LEETCODE",
"exampleTestcases": "{\"headers\":{\"Orders\":[\"order_id\",\"item_count\",\"order_occurrences\"]},\"rows\":{\"Orders\":[[10,1,500],[11,2,1000],[12,3,800],[13,4,1000]]}}",
"__typename": "QuestionNode"
}
}
}MySQL 8.0<\\/code><\\/p>\"],\"mssql\":[\"MS SQL Server\",\"