1
+ {
2
+ "data" : {
3
+ "question" : {
4
+ "questionId" : " 3609" ,
5
+ "questionFrontendId" : " 3293" ,
6
+ "categoryTitle" : " Database" ,
7
+ "boundTopicId" : 2920566 ,
8
+ "title" : " Calculate Product Final Price" ,
9
+ "titleSlug" : " calculate-product-final-price" ,
10
+ "content" : null ,
11
+ "translatedTitle" : " 计算产品最终价格" ,
12
+ "translatedContent" : null ,
13
+ "isPaidOnly" : true ,
14
+ "difficulty" : " Medium" ,
15
+ "likes" : 0 ,
16
+ "dislikes" : 0 ,
17
+ "isLiked" : null ,
18
+ "similarQuestions" : " []" ,
19
+ "contributors" : [],
20
+ "langToValidPlayground" : null ,
21
+ "topicTags" : [
22
+ {
23
+ "name" : " Database" ,
24
+ "slug" : " database" ,
25
+ "translatedName" : " 数据库" ,
26
+ "__typename" : " TopicTagNode"
27
+ }
28
+ ],
29
+ "companyTagStats" : null ,
30
+ "codeSnippets" : null ,
31
+ "stats" : " {\" totalAccepted\" : \" 21\" , \" totalSubmission\" : \" 24\" , \" totalAcceptedRaw\" : 21, \" totalSubmissionRaw\" : 24, \" acRate\" : \" 87.5%\" }" ,
32
+ "hints" : [],
33
+ "solution" : null ,
34
+ "status" : null ,
35
+ "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]]}}" ,
36
+ "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\"}}}",
37
+ "judgerAvailable" : true ,
38
+ "judgeType" : " large" ,
39
+ "mysqlSchemas" : [
40
+ " Create table if not exists Products (product_id int, category varchar(50), price int)" ,
41
+ " Create table if not exists Discounts(category varchar(50), discount int)" ,
42
+ " Truncate table Products" ,
43
+ " insert into Products (product_id, category, price) values ('1', 'Electronics', '1000')" ,
44
+ " insert into Products (product_id, category, price) values ('2', 'Clothing', '50')" ,
45
+ " insert into Products (product_id, category, price) values ('3', 'Electronics', '1200')" ,
46
+ " insert into Products (product_id, category, price) values ('4', 'Home', '500')" ,
47
+ " Truncate table Discounts" ,
48
+ " insert into Discounts (category, discount) values ('Electronics', '10')" ,
49
+ " insert into Discounts (category, discount) values ('Clothing', '20')"
50
+ ],
51
+ "enableRunCode" : true ,
52
+ "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>\" ]}" ,
53
+ "book" : null ,
54
+ "isSubscribed" : false ,
55
+ "isDailyQuestion" : false ,
56
+ "dailyRecordStatus" : null ,
57
+ "editorType" : " CKEDITOR" ,
58
+ "ugcQuestionId" : null ,
59
+ "style" : " LEETCODE" ,
60
+ "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]]}}" ,
61
+ "__typename" : " QuestionNode"
62
+ }
63
+ }
64
+ }
0 commit comments