1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-01-10 18:48:13 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
leetcode-problemset/leetcode-cn/originData/[no content]calculate-product-final-price.json
2024-09-19 09:27:23 +08:00

64 lines
4.7 KiB
JSON

{
"data": {
"question": {
"questionId": "3609",
"questionFrontendId": "3293",
"categoryTitle": "Database",
"boundTopicId": 2920566,
"title": "Calculate Product Final Price",
"titleSlug": "calculate-product-final-price",
"content": null,
"translatedTitle": "计算产品最终价格",
"translatedContent": null,
"isPaidOnly": true,
"difficulty": "Medium",
"likes": 0,
"dislikes": 0,
"isLiked": null,
"similarQuestions": "[]",
"contributors": [],
"langToValidPlayground": null,
"topicTags": [
{
"name": "Database",
"slug": "database",
"translatedName": "数据库",
"__typename": "TopicTagNode"
}
],
"companyTagStats": null,
"codeSnippets": null,
"stats": "{\"totalAccepted\": \"21\", \"totalSubmission\": \"24\", \"totalAcceptedRaw\": 21, \"totalSubmissionRaw\": 24, \"acRate\": \"87.5%\"}",
"hints": [],
"solution": null,
"status": null,
"sampleTestCase": "{\"headers\":{\"Products\":[\"product_id\",\"category\",\"price\"],\"Discounts\":[\"category\",\"discount\"]},\"rows\":{\"Products\":[[1,\"Electronics\",1000],[2,\"Clothing\",50],[3,\"Electronics\",1200],[4,\"Home\",500]],\"Discounts\":[[\"Electronics\",10],[\"Clothing\",20]]}}",
"metaData": "{\"mysql\":[\"Create table if not exists Products (product_id int, category varchar(50), price int)\",\"Create table if not exists Discounts(category varchar(50), discount int)\"],\"mssql\":[\"Create table Products (product_id int, category varchar(50), price int)\",\"Create table Discounts(category varchar(50), discount int)\"],\"oraclesql\":[\"Create table Products (product_id Number, category varchar2(50), price Number)\",\"Create table Discounts(category varchar2(50), discount Number)\"],\"database\":true,\"name\":\"calculate_final_prices\",\"postgresql\":[\"CREATE TABLE IF NOT EXISTS Products (\\n product_id INT,\\n category VARCHAR(50),\\n price INT\\n);\\n\",\"CREATE TABLE IF NOT EXISTS Discounts (\\n category VARCHAR(50),\\n discount INT\\n);\\n\"],\"pythondata\":[\"Products = pd.DataFrame(columns=['product_id', 'category', 'price'], dtype=int)\\n\",\"Discounts = pd.DataFrame({'category': pd.Series(dtype='str'), 'discount': pd.Series(dtype='int')})\\n\"],\"database_schema\":{\"Products\":{\"product_id\":\"INT\",\"category\":\"VARCHAR(50)\",\"price\":\"INT\"},\"Discounts\":{\"category\":\"VARCHAR(50)\",\"discount\":\"INT\"}}}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [
"Create table if not exists Products (product_id int, category varchar(50), price int)",
"Create table if not exists Discounts(category varchar(50), discount int)",
"Truncate table Products",
"insert into Products (product_id, category, price) values ('1', 'Electronics', '1000')",
"insert into Products (product_id, category, price) values ('2', 'Clothing', '50')",
"insert into Products (product_id, category, price) values ('3', 'Electronics', '1200')",
"insert into Products (product_id, category, price) values ('4', 'Home', '500')",
"Truncate table Discounts",
"insert into Discounts (category, discount) values ('Electronics', '10')",
"insert into Discounts (category, discount) values ('Clothing', '20')"
],
"enableRunCode": true,
"envInfo": "{\"mysql\":[\"MySQL\",\"<p>\\u7248\\u672c\\uff1a<code>MySQL 8.0<\\/code><\\/p>\"],\"mssql\":[\"MS SQL Server\",\"<p>mssql server 2019.<\\/p>\"],\"oraclesql\":[\"Oracle\",\"<p>Oracle Sql 11.2.<\\/p>\"],\"pythondata\":[\"Pandas\",\"<p>Python 3.10 with Pandas 2.0.2 and NumPy 1.25.0<\\/p>\"],\"postgresql\":[\"PostgreSQL\",\"<p>PostgreSQL 16<\\/p>\"]}",
"book": null,
"isSubscribed": false,
"isDailyQuestion": false,
"dailyRecordStatus": null,
"editorType": "CKEDITOR",
"ugcQuestionId": null,
"style": "LEETCODE",
"exampleTestcases": "{\"headers\":{\"Products\":[\"product_id\",\"category\",\"price\"],\"Discounts\":[\"category\",\"discount\"]},\"rows\":{\"Products\":[[1,\"Electronics\",1000],[2,\"Clothing\",50],[3,\"Electronics\",1200],[4,\"Home\",500]],\"Discounts\":[[\"Electronics\",10],[\"Clothing\",20]]}}",
"__typename": "QuestionNode"
}
}
}