mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-01-10 18:48:13 +08:00
73 lines
7.3 KiB
JSON
73 lines
7.3 KiB
JSON
{
|
|
"data": {
|
|
"question": {
|
|
"questionId": "1623",
|
|
"questionFrontendId": "1479",
|
|
"categoryTitle": "Database",
|
|
"boundTopicId": 287675,
|
|
"title": "Sales by Day of the Week",
|
|
"titleSlug": "sales-by-day-of-the-week",
|
|
"content": null,
|
|
"translatedTitle": "周内每天的销售情况",
|
|
"translatedContent": null,
|
|
"isPaidOnly": true,
|
|
"difficulty": "Hard",
|
|
"likes": 20,
|
|
"dislikes": 0,
|
|
"isLiked": null,
|
|
"similarQuestions": "[]",
|
|
"contributors": [],
|
|
"langToValidPlayground": null,
|
|
"topicTags": [
|
|
{
|
|
"name": "Database",
|
|
"slug": "database",
|
|
"translatedName": "数据库",
|
|
"__typename": "TopicTagNode"
|
|
}
|
|
],
|
|
"companyTagStats": null,
|
|
"codeSnippets": null,
|
|
"stats": "{\"totalAccepted\": \"4.2K\", \"totalSubmission\": \"7.5K\", \"totalAcceptedRaw\": 4212, \"totalSubmissionRaw\": 7453, \"acRate\": \"56.5%\"}",
|
|
"hints": [],
|
|
"solution": null,
|
|
"status": null,
|
|
"sampleTestCase": "{\"headers\": {\"Orders\": [\"order_id\", \"customer_id\", \"order_date\", \"item_id\", \"quantity\"], \"Items\": [\"item_id\", \"item_name\", \"item_category\"]}, \"rows\": {\"Orders\": [[1, 1, \"2020-06-01\", 1, 10], [2, 1, \"2020-06-08\", 2, 10], [3, 2, \"2020-06-02\", 1, 5], [4, 3, \"2020-06-03\", 3, 5], [5, 4, \"2020-06-04\", 4, 1], [6, 4, \"2020-06-05\", 5, 5], [7, 5, \"2020-06-05\", 1, 10], [8, 5, \"2020-06-14\", 4, 5], [9, 5, \"2020-06-21\", 3, 5]], \"Items\": [[1, \"LC Alg. Book\", \"Book\"], [2, \"LC DB. Book\", \"Book\"], [3, \"LC SmarthPhone\", \"Phone\"], [4, \"LC Phone 2020\", \"Phone\"], [5, \"LC SmartGlass\", \"Glasses\"], [6, \"LC T-Shirt XL\", \"T-shirt\"]]}}",
|
|
"metaData": "{\"mysql\":[\"Create table If Not Exists Orders (order_id int, customer_id int, order_date date, item_id varchar(30), quantity int)\",\"Create table If Not Exists Items (item_id varchar(30), item_name varchar(30), item_category varchar(30))\"],\"mssql\":[\"Create table Orders (order_id int, customer_id int, order_date date, item_id varchar(30), quantity int)\",\"Create table Items (item_id varchar(30), item_name varchar(30), item_category varchar(30))\"],\"oraclesql\":[\"Create table Orders (order_id int, customer_id int, order_date date, item_id varchar(30), quantity int)\",\"Create table Items (item_id varchar(30), item_name varchar(30), item_category varchar(30))\",\"ALTER SESSION SET nls_date_format='YYYY-MM-DD'\"],\"database\":true,\"name\":\"sales_by_day\",\"pythondata\":[\"Orders = pd.DataFrame([], columns=['order_id', 'customer_id', 'order_date', 'item_id', 'quantity']).astype({'order_id':'Int64', 'customer_id':'Int64', 'order_date':'datetime64[ns]', 'item_id':'object', 'quantity':'Int64'})\",\"Items = pd.DataFrame([], columns=['item_id', 'item_name', 'item_category']).astype({'item_id':'object', 'item_name':'object', 'item_category':'object'})\"],\"postgresql\":[\"\\nCreate table If Not Exists Orders (order_id int, customer_id int, order_date date, item_id varchar(30), quantity int)\",\"Create table If Not Exists Items (item_id varchar(30), item_name varchar(30), item_category varchar(30))\"],\"database_schema\":{\"Orders\":{\"order_id\":\"INT\",\"customer_id\":\"INT\",\"order_date\":\"DATE\",\"item_id\":\"VARCHAR(30)\",\"quantity\":\"INT\"},\"Items\":{\"item_id\":\"VARCHAR(30)\",\"item_name\":\"VARCHAR(30)\",\"item_category\":\"VARCHAR(30)\"}}}",
|
|
"judgerAvailable": true,
|
|
"judgeType": "large",
|
|
"mysqlSchemas": [
|
|
"Create table If Not Exists Orders (order_id int, customer_id int, order_date date, item_id varchar(30), quantity int)",
|
|
"Create table If Not Exists Items (item_id varchar(30), item_name varchar(30), item_category varchar(30))",
|
|
"Truncate table Orders",
|
|
"insert into Orders (order_id, customer_id, order_date, item_id, quantity) values ('1', '1', '2020-06-01', '1', '10')",
|
|
"insert into Orders (order_id, customer_id, order_date, item_id, quantity) values ('2', '1', '2020-06-08', '2', '10')",
|
|
"insert into Orders (order_id, customer_id, order_date, item_id, quantity) values ('3', '2', '2020-06-02', '1', '5')",
|
|
"insert into Orders (order_id, customer_id, order_date, item_id, quantity) values ('4', '3', '2020-06-03', '3', '5')",
|
|
"insert into Orders (order_id, customer_id, order_date, item_id, quantity) values ('5', '4', '2020-06-04', '4', '1')",
|
|
"insert into Orders (order_id, customer_id, order_date, item_id, quantity) values ('6', '4', '2020-06-05', '5', '5')",
|
|
"insert into Orders (order_id, customer_id, order_date, item_id, quantity) values ('7', '5', '2020-06-05', '1', '10')",
|
|
"insert into Orders (order_id, customer_id, order_date, item_id, quantity) values ('8', '5', '2020-06-14', '4', '5')",
|
|
"insert into Orders (order_id, customer_id, order_date, item_id, quantity) values ('9', '5', '2020-06-21', '3', '5')",
|
|
"Truncate table Items",
|
|
"insert into Items (item_id, item_name, item_category) values ('1', 'LC Alg. Book', 'Book')",
|
|
"insert into Items (item_id, item_name, item_category) values ('2', 'LC DB. Book', 'Book')",
|
|
"insert into Items (item_id, item_name, item_category) values ('3', 'LC SmarthPhone', 'Phone')",
|
|
"insert into Items (item_id, item_name, item_category) values ('4', 'LC Phone 2020', 'Phone')",
|
|
"insert into Items (item_id, item_name, item_category) values ('5', 'LC SmartGlass', 'Glasses')",
|
|
"insert into Items (item_id, item_name, item_category) values ('6', 'LC T-Shirt XL', 'T-shirt')"
|
|
],
|
|
"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\": {\"Orders\": [\"order_id\", \"customer_id\", \"order_date\", \"item_id\", \"quantity\"], \"Items\": [\"item_id\", \"item_name\", \"item_category\"]}, \"rows\": {\"Orders\": [[1, 1, \"2020-06-01\", 1, 10], [2, 1, \"2020-06-08\", 2, 10], [3, 2, \"2020-06-02\", 1, 5], [4, 3, \"2020-06-03\", 3, 5], [5, 4, \"2020-06-04\", 4, 1], [6, 4, \"2020-06-05\", 5, 5], [7, 5, \"2020-06-05\", 1, 10], [8, 5, \"2020-06-14\", 4, 5], [9, 5, \"2020-06-21\", 3, 5]], \"Items\": [[1, \"LC Alg. Book\", \"Book\"], [2, \"LC DB. Book\", \"Book\"], [3, \"LC SmarthPhone\", \"Phone\"], [4, \"LC Phone 2020\", \"Phone\"], [5, \"LC SmartGlass\", \"Glasses\"], [6, \"LC T-Shirt XL\", \"T-shirt\"]]}}",
|
|
"__typename": "QuestionNode"
|
|
}
|
|
}
|
|
} |