1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-10-23 22:08:58 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
Files
leetcode-problemset/leetcode-cn/originData/find-golden-hour-customers.json
2025-10-19 23:12:56 +08:00

96 lines
24 KiB
JSON
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
"data": {
"question": {
"questionId": "4091",
"questionFrontendId": "3705",
"categoryTitle": "Database",
"boundTopicId": 3798940,
"title": "Find Golden Hour Customers",
"titleSlug": "find-golden-hour-customers",
"content": "<p>Table: <code>restaurant_orders</code></p>\n\n<pre>\n+------------------+----------+\n| Column Name | Type | \n+------------------+----------+\n| order_id | int |\n| customer_id | int |\n| order_timestamp | datetime |\n| order_amount | decimal |\n| payment_method | varchar |\n| order_rating | int |\n+------------------+----------+\norder_id is the unique identifier for this table.\npayment_method can be cash, card, or app.\norder_rating is between 1 and 5, where 5 is the best (NULL if not rated).\norder_timestamp contains both date and time information.\n</pre>\n\n<p>Write a solution to find <strong>golden hour customers</strong>&nbsp;- customers who consistently order during peak hours and provide high satisfaction. A customer is a <strong>golden hour customer</strong> if they meet ALL the following criteria:</p>\n\n<ul>\n\t<li>Made <strong>at least</strong> <code>3</code> orders.</li>\n\t<li><strong>At least</strong> <code>60%</code> of their orders are during <strong>peak hours&nbsp;</strong>(<code>11:00</code>-<code>14:00</code> or <code>18:00</code>-<code>21:00</code>).</li>\n\t<li>Their <strong>average rating</strong> for rated orders is at least <code>4.0,</code> round it to<code> 2 </code>decimal places.</li>\n\t<li>Have rated <strong>at least</strong> <code>50%</code> of their orders.</li>\n</ul>\n\n<p>Return <em>the result table ordered by</em> <code>average_rating</code> <em>in <strong>descending</strong> order, then by</em> <code>customer_id</code> <em>in <strong>descending</strong> order</em>.</p>\n\n<p>The result format is in the following example.</p>\n\n<p>&nbsp;</p>\n<p><strong class=\"example\">Example:</strong></p>\n\n<div class=\"example-block\">\n<p><strong>Input:</strong></p>\n\n<p>restaurant_orders table:</p>\n\n<pre class=\"example-io\">\n+----------+-------------+---------------------+--------------+----------------+--------------+\n| order_id | customer_id | order_timestamp | order_amount | payment_method | order_rating |\n+----------+-------------+---------------------+--------------+----------------+--------------+\n| 1 | 101 | 2024-03-01 12:30:00 | 25.50 | card | 5 |\n| 2 | 101 | 2024-03-02 19:15:00 | 32.00 | app | 4 |\n| 3 | 101 | 2024-03-03 13:45:00 | 28.75 | card | 5 |\n| 4 | 101 | 2024-03-04 20:30:00 | 41.00 | app | NULL |\n| 5 | 102 | 2024-03-01 11:30:00 | 18.50 | cash | 4 |\n| 6 | 102 | 2024-03-02 12:00:00 | 22.00 | card | 3 |\n| 7 | 102 | 2024-03-03 15:30:00 | 19.75 | cash | NULL |\n| 8 | 103 | 2024-03-01 19:00:00 | 55.00 | app | 5 |\n| 9 | 103 | 2024-03-02 20:45:00 | 48.50 | app | 4 |\n| 10 | 103 | 2024-03-03 18:30:00 | 62.00 | card | 5 |\n| 11 | 104 | 2024-03-01 10:00:00 | 15.00 | cash | 3 |\n| 12 | 104 | 2024-03-02 09:30:00 | 18.00 | cash | 2 |\n| 13 | 104 | 2024-03-03 16:00:00 | 20.00 | card | 3 |\n| 14 | 105 | 2024-03-01 12:15:00 | 30.00 | app | 4 |\n| 15 | 105 | 2024-03-02 13:00:00 | 35.50 | app | 5 |\n| 16 | 105 | 2024-03-03 11:45:00 | 28.00 | card | 4 |\n+----------+-------------+---------------------+--------------+----------------+--------------+\n</pre>\n\n<p><strong>Output:</strong></p>\n\n<pre class=\"example-io\">\n+-------------+--------------+----------------------+----------------+\n| customer_id | total_orders | peak_hour_percentage | average_rating |\n+-------------+--------------+----------------------+----------------+\n| 103 | 3 | 100 | 4.67 |\n| 101 | 4 | 75 | 4.67 |\n| 105 | 3 | 100 | 4.33 |\n+-------------+--------------+----------------------+----------------+\n</pre>\n\n<p><strong>Explanation:</strong></p>\n\n<ul>\n\t<li><strong>Customer 101</strong>:\n\n\t<ul>\n\t\t<li>Total orders: 4 (at least 3)&nbsp;</li>\n\t\t<li>Peak hour orders: 3 out of 4 (12:30, 19:15, 13:45, and 20:30 are in peak hours)</li>\n\t\t<li>Peak hour percentage: 3/4 = 75% (at least 60%)&nbsp;</li>\n\t\t<li>Rated orders: 3 out of 4 (75% rating completion)&nbsp;</li>\n\t\t<li>Average rating: (5+4+5)/3 = 4.67 (at least 4.0)&nbsp;</li>\n\t\t<li>Result: <strong>Golden hour customer</strong></li>\n\t</ul>\n\t</li>\n\t<li><strong>Customer 102</strong>:\n\t<ul>\n\t\t<li>Total orders: 3 (at least 3)&nbsp;</li>\n\t\t<li>Peak hour orders: 2 out of 3 (11:30, 12:00 are in peak hours; 15:30 is not)</li>\n\t\t<li>Peak hour percentage: 2/3 = 66.67% (at least 60%)&nbsp;</li>\n\t\t<li>Rated orders: 2 out of 3 (66.67% rating completion)&nbsp;</li>\n\t\t<li>Average rating: (4+3)/2 = 3.5 (less than 4.0)&nbsp;</li>\n\t\t<li>Result: <strong>Not a golden hour customer</strong> (average rating too low)</li>\n\t</ul>\n\t</li>\n\t<li><strong>Customer 103</strong>:\n\t<ul>\n\t\t<li>Total orders: 3 (at least 3)&nbsp;</li>\n\t\t<li>Peak hour orders: 3 out of 3 (19:00, 20:45, 18:30 all in evening peak)</li>\n\t\t<li>Peak hour percentage: 3/3 = 100% (at least 60%)&nbsp;</li>\n\t\t<li>Rated orders: 3 out of 3 (100% rating completion)&nbsp;</li>\n\t\t<li>Average rating: (5+4+5)/3 = 4.67 (at least 4.0)&nbsp;</li>\n\t\t<li>Result: <strong>Golden hour customer</strong></li>\n\t</ul>\n\t</li>\n\t<li><strong>Customer 104</strong>:\n\t<ul>\n\t\t<li>Total orders: 3 (at least 3)&nbsp;</li>\n\t\t<li>Peak hour orders: 0 out of 3 (10:00, 09:30, 16:00 all outside peak hours)</li>\n\t\t<li>Peak hour percentage: 0/3 = 0% (less than 60%)&nbsp;</li>\n\t\t<li>Result: <strong>Not a golden hour customer</strong> (insufficient peak hour orders)</li>\n\t</ul>\n\t</li>\n\t<li><strong>Customer 105</strong>:\n\t<ul>\n\t\t<li>Total orders: 3 (at least 3)&nbsp;</li>\n\t\t<li>Peak hour orders: 3 out of 3 (12:15, 13:00, 11:45 all in lunch peak)</li>\n\t\t<li>Peak hour percentage: 3/3 = 100% (at least 60%)&nbsp;</li>\n\t\t<li>Rated orders: 3 out of 3 (100% rating completion)&nbsp;</li>\n\t\t<li>Average rating: (4+5+4)/3 = 4.33 (at least 4.0)&nbsp;</li>\n\t\t<li>Result: <strong>Golden hour customer</strong></li>\n\t</ul>\n\t</li>\n</ul>\n\n<p>The results table is ordered by average_rating DESC, then customer_id DESC.</p>\n</div>\n",
"translatedTitle": "寻找黄金时段客户",
"translatedContent": "<p>表:<code>restaurant_orders</code></p>\n\n<pre>\n+------------------+----------+\n| Column Name | Type | \n+------------------+----------+\n| order_id | int |\n| customer_id | int |\n| order_timestamp | datetime |\n| order_amount | decimal |\n| payment_method | varchar |\n| order_rating | int |\n+------------------+----------+\norder_id 是这张表的唯一主键。\npayment_method 可以是 cashcard 或 app。\norder_rating 在 1 到 5 之间,其中 5 是最佳(如果没有评分则是 NULL。\norder_timestamp 同时包含日期和时间信息。\n</pre>\n\n<p>编写一个解决方案来寻找 <strong>黄金时间客户</strong>&nbsp;- 高峰时段持续订购且满意度高的客户。客户若满足以下所有条件,则被视为 <strong>黄金时段客户</strong></p>\n\n<ul>\n\t<li>进行 <strong>至少</strong>&nbsp;<code>3</code>&nbsp;笔订单。</li>\n\t<li>他们有&nbsp;<strong>至少</strong>&nbsp;<code>60%</code>&nbsp;的订单在 <strong>高峰时间</strong>&nbsp;中(<code>11:00</code>-<code>14:00</code> 或&nbsp;<code>18:00</code>-<code>21:00</code>)。</li>\n\t<li>他们的 <strong>平均评分</strong> 至少为 <code>4.0</code>,四舍五入到小数点后 <code>2</code> 位。</li>\n\t<li>已评价至少 <code>50%</code> 的订单。</li>\n</ul>\n\n<p>返回结果表按&nbsp;<code>average_rating</code> <strong>降序</strong>&nbsp;排序,然后按&nbsp;<code>customer_id</code> <strong>降序&nbsp;</strong>排序。</p>\n\n<p>结果格式如下所示。</p>\n\n<p>&nbsp;</p>\n\n<p><strong class=\"example\">示例:</strong></p>\n\n<div class=\"example-block\">\n<p><b>输入:</b></p>\n\n<p>restaurant_orders 表:</p>\n\n<pre class=\"example-io\">\n+----------+-------------+---------------------+--------------+----------------+--------------+\n| order_id | customer_id | order_timestamp | order_amount | payment_method | order_rating |\n+----------+-------------+---------------------+--------------+----------------+--------------+\n| 1 | 101 | 2024-03-01 12:30:00 | 25.50 | card | 5 |\n| 2 | 101 | 2024-03-02 19:15:00 | 32.00 | app | 4 |\n| 3 | 101 | 2024-03-03 13:45:00 | 28.75 | card | 5 |\n| 4 | 101 | 2024-03-04 20:30:00 | 41.00 | app | NULL |\n| 5 | 102 | 2024-03-01 11:30:00 | 18.50 | cash | 4 |\n| 6 | 102 | 2024-03-02 12:00:00 | 22.00 | card | 3 |\n| 7 | 102 | 2024-03-03 15:30:00 | 19.75 | cash | NULL |\n| 8 | 103 | 2024-03-01 19:00:00 | 55.00 | app | 5 |\n| 9 | 103 | 2024-03-02 20:45:00 | 48.50 | app | 4 |\n| 10 | 103 | 2024-03-03 18:30:00 | 62.00 | card | 5 |\n| 11 | 104 | 2024-03-01 10:00:00 | 15.00 | cash | 3 |\n| 12 | 104 | 2024-03-02 09:30:00 | 18.00 | cash | 2 |\n| 13 | 104 | 2024-03-03 16:00:00 | 20.00 | card | 3 |\n| 14 | 105 | 2024-03-01 12:15:00 | 30.00 | app | 4 |\n| 15 | 105 | 2024-03-02 13:00:00 | 35.50 | app | 5 |\n| 16 | 105 | 2024-03-03 11:45:00 | 28.00 | card | 4 |\n+----------+-------------+---------------------+--------------+----------------+--------------+\n</pre>\n\n<p><strong>输出:</strong></p>\n\n<pre class=\"example-io\">\n+-------------+--------------+----------------------+----------------+\n| customer_id | total_orders | peak_hour_percentage | average_rating |\n+-------------+--------------+----------------------+----------------+\n| 103 | 3 | 100 | 4.67 |\n| 101 | 4 | 75 | 4.67 |\n| 105 | 3 | 100 | 4.33 |\n+-------------+--------------+----------------------+----------------+\n</pre>\n\n<p><strong>解释:</strong></p>\n\n<ul>\n\t<li><strong>客户 101</strong>\n\n\t<ul>\n\t\t<li>总订单数4至少 3 笔)</li>\n\t\t<li>高峰时间订单4 笔中有 3 笔12:3019:1513:45 和 20:30 在高峰时间)</li>\n\t\t<li>高峰时间占比3/4 = 75%(至少 60%</li>\n\t\t<li>已评分的订单4 笔中有 3 笔75% 评分完成率)</li>\n\t\t<li>平均评分:(5+4+5)/3 = 4.67(至少 4.0</li>\n\t\t<li>结果:<strong>黄金时段客户</strong></li>\n\t</ul>\n\t</li>\n\t<li><strong>客户 102</strong>:\n\t<ul>\n\t\t<li>总订单数3至少 3 笔)</li>\n\t\t<li>高峰时间订单3 笔中有 2 笔11:3012:00 都在高峰时间,但 15:30 不是)</li>\n\t\t<li>高峰时间占比2/3 = 66.67%(至少 60%</li>\n\t\t<li>已评分的订单3 笔中有 2 笔66.67% 评分完成率)</li>\n\t\t<li>平均评分:(4+3)/2 = 3.5(少于 4.0</li>\n\t\t<li>结果:<strong>不是黄金时段客户</strong>(平均评分太低)</li>\n\t</ul>\n\t</li>\n\t<li><strong>客户 103</strong>:\n\t<ul>\n\t\t<li>总订单数3至少 3 笔)</li>\n\t\t<li>高峰时间订单3 笔中有 3 19:0020:4518:30 都在傍晚高峰时间)</li>\n\t\t<li>高峰时间占比3/3 = 100%(至少 60%</li>\n\t\t<li>已评分的订单3 笔中有 3 笔100% 评分完成率)</li>\n\t\t<li>平均评分:(5+4+5)/3 = 4.67(至少 4.0</li>\n\t\t<li>结果:<strong>黄金时段客户</strong></li>\n\t</ul>\n\t</li>\n\t<li><strong>客户 104</strong>:\n\t<ul>\n\t\t<li>总订单数3至少 3 笔)</li>\n\t\t<li>高峰时间订单3 笔中有 0 笔10:0009:3016:00 都不在高峰时间)</li>\n\t\t<li>高峰时间占比0/3 = 0%(至少 60%</li>\n\t\t<li>结果:<strong>不是黄金时段客户</strong>(高峰时段订单不足)</li>\n\t</ul>\n\t</li>\n\t<li><strong>客户 105</strong>:\n\t<ul>\n\t\t<li>总订单数3至少 3 笔)</li>\n\t\t<li>高峰时间订单3 笔中有 3 笔12:1513:0011:45 都在中午高峰时间)</li>\n\t\t<li>高峰时间占比3/3 = 100%(至少 60%</li>\n\t\t<li>已评分的订单3 笔中有 3 笔100% 评分完成率)</li>\n\t\t<li>平均评分:(4+5+4)/3 = 4.33(至少 4.0</li>\n\t\t<li>结果:<strong>黄金时段客户</strong></li>\n\t</ul>\n\t</li>\n</ul>\n\n<p>结果表按 average_rating 降序排序,然后按 customer_id 降序排序。</p>\n</div>\n",
"isPaidOnly": false,
"difficulty": "Medium",
"likes": 0,
"dislikes": 0,
"isLiked": null,
"similarQuestions": "[]",
"contributors": [],
"langToValidPlayground": "{\"cpp\": false, \"java\": false, \"python3\": false, \"python\": false, \"javascript\": false, \"typescript\": false, \"csharp\": false, \"c\": false, \"golang\": false, \"kotlin\": false, \"swift\": false, \"rust\": false, \"ruby\": false, \"php\": false, \"dart\": false, \"scala\": false, \"elixir\": false, \"erlang\": false, \"racket\": false, \"cangjie\": false, \"bash\": false, \"html\": false, \"pythonml\": false, \"react\": false, \"vanillajs\": false, \"mysql\": false, \"mssql\": false, \"postgresql\": false, \"oraclesql\": false, \"pythondata\": false}",
"topicTags": [],
"companyTagStats": null,
"codeSnippets": [
{
"lang": "MySQL",
"langSlug": "mysql",
"code": "# Write your MySQL query statement below",
"__typename": "CodeSnippetNode"
},
{
"lang": "MS SQL Server",
"langSlug": "mssql",
"code": "/* Write your T-SQL query statement below */",
"__typename": "CodeSnippetNode"
},
{
"lang": "PostgreSQL",
"langSlug": "postgresql",
"code": "-- Write your PostgreSQL query statement below",
"__typename": "CodeSnippetNode"
},
{
"lang": "Oracle",
"langSlug": "oraclesql",
"code": "/* Write your PL/SQL query statement below */",
"__typename": "CodeSnippetNode"
},
{
"lang": "Pandas",
"langSlug": "pythondata",
"code": "import pandas as pd\n\ndef find_golden_hour_customers(restaurant_orders: pd.DataFrame) -> pd.DataFrame:\n ",
"__typename": "CodeSnippetNode"
}
],
"stats": "{\"totalAccepted\": \"196\", \"totalSubmission\": \"350\", \"totalAcceptedRaw\": 196, \"totalSubmissionRaw\": 350, \"acRate\": \"56.0%\"}",
"hints": [],
"solution": null,
"status": null,
"sampleTestCase": "{\"headers\":{\"restaurant_orders\":[\"order_id\",\"customer_id\",\"order_timestamp\",\"order_amount\",\"payment_method\",\"order_rating\"]},\"rows\":{\"restaurant_orders\":[[1,101,\"2024-03-01 12:30:00\",25.50,\"card\",5],[2,101,\"2024-03-02 19:15:00\",32.00,\"app\",4],[3,101,\"2024-03-03 13:45:00\",28.75,\"card\",5],[4,101,\"2024-03-04 20:30:00\",41.00,\"app\",null],[5,102,\"2024-03-01 11:30:00\",18.50,\"cash\",4],[6,102,\"2024-03-02 12:00:00\",22.00,\"card\",3],[7,102,\"2024-03-03 15:30:00\",19.75,\"cash\",null],[8,103,\"2024-03-01 19:00:00\",55.00,\"app\",5],[9,103,\"2024-03-02 20:45:00\",48.50,\"app\",4],[10,103,\"2024-03-03 18:30:00\",62.00,\"card\",5],[11,104,\"2024-03-01 10:00:00\",15.00,\"cash\",3],[12,104,\"2024-03-02 09:30:00\",18.00,\"cash\",2],[13,104,\"2024-03-03 16:00:00\",20.00,\"card\",3],[14,105,\"2024-03-01 12:15:00\",30.00,\"app\",4],[15,105,\"2024-03-02 13:00:00\",35.50,\"app\",5],[16,105,\"2024-03-03 11:45:00\",28.00,\"card\",4]]}}",
"metaData": "{\"mysql\":[\"CREATE TABLE restaurant_orders (\\n order_id INT,\\n customer_id INT,\\n order_timestamp DATETIME,\\n order_amount DECIMAL(10,2),\\n payment_method VARCHAR(10),\\n order_rating INT\\n)\"],\"mssql\":[\"CREATE TABLE restaurant_orders (\\n order_id INT,\\n customer_id INT,\\n order_timestamp DATETIME,\\n order_amount DECIMAL(10,2),\\n payment_method VARCHAR(10),\\n order_rating INT\\n)\"],\"oraclesql\":[\"CREATE TABLE restaurant_orders (\\n order_id NUMBER,\\n customer_id NUMBER,\\n order_timestamp DATE,\\n order_amount NUMBER(10,2),\\n payment_method VARCHAR2(10),\\n order_rating NUMBER\\n)\",\"ALTER SESSION SET nls_date_format='YYYY-MM-DD HH24:MI:SS'\"],\"database\":true,\"name\":\"find_golden_hour_customers\",\"pythondata\":[\"restaurant_orders = pd.DataFrame({\\n \\\"order_id\\\": pd.Series(dtype=\\\"int\\\"),\\n \\\"customer_id\\\": pd.Series(dtype=\\\"int\\\"),\\n \\\"order_timestamp\\\": pd.Series(dtype=\\\"datetime64[ns]\\\"),\\n \\\"order_amount\\\": pd.Series(dtype=\\\"float\\\"),\\n \\\"payment_method\\\": pd.Series(dtype=\\\"string\\\"),\\n \\\"order_rating\\\": pd.Series(dtype=\\\"Int64\\\") # nullable integer for ratings that can be NULL\\n})\"],\"postgresql\":[\"CREATE TABLE restaurant_orders (\\n order_id SERIAL PRIMARY KEY,\\n customer_id INT,\\n order_timestamp TIMESTAMP,\\n order_amount NUMERIC(10,2),\\n payment_method VARCHAR(10),\\n order_rating INT\\n);\\n\"],\"database_schema\":{\"restaurant_orders\":{\"order_id\":\"INT\",\"customer_id\":\"INT\",\"order_timestamp\":\"DATETIME\",\"order_amount\":\"DECIMAL(10, 2)\",\"payment_method\":\"VARCHAR(10)\",\"order_rating\":\"INT\"}}}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [
"CREATE TABLE restaurant_orders (\n order_id INT,\n customer_id INT,\n order_timestamp DATETIME,\n order_amount DECIMAL(10,2),\n payment_method VARCHAR(10),\n order_rating INT\n)",
"Truncate table restaurant_orders",
"insert into restaurant_orders (order_id, customer_id, order_timestamp, order_amount, payment_method, order_rating) values ('1', '101', '2024-03-01 12:30:00', '25.5', 'card', '5')",
"insert into restaurant_orders (order_id, customer_id, order_timestamp, order_amount, payment_method, order_rating) values ('2', '101', '2024-03-02 19:15:00', '32.0', 'app', '4')",
"insert into restaurant_orders (order_id, customer_id, order_timestamp, order_amount, payment_method, order_rating) values ('3', '101', '2024-03-03 13:45:00', '28.75', 'card', '5')",
"insert into restaurant_orders (order_id, customer_id, order_timestamp, order_amount, payment_method, order_rating) values ('4', '101', '2024-03-04 20:30:00', '41.0', 'app', NULL)",
"insert into restaurant_orders (order_id, customer_id, order_timestamp, order_amount, payment_method, order_rating) values ('5', '102', '2024-03-01 11:30:00', '18.5', 'cash', '4')",
"insert into restaurant_orders (order_id, customer_id, order_timestamp, order_amount, payment_method, order_rating) values ('6', '102', '2024-03-02 12:00:00', '22.0', 'card', '3')",
"insert into restaurant_orders (order_id, customer_id, order_timestamp, order_amount, payment_method, order_rating) values ('7', '102', '2024-03-03 15:30:00', '19.75', 'cash', NULL)",
"insert into restaurant_orders (order_id, customer_id, order_timestamp, order_amount, payment_method, order_rating) values ('8', '103', '2024-03-01 19:00:00', '55.0', 'app', '5')",
"insert into restaurant_orders (order_id, customer_id, order_timestamp, order_amount, payment_method, order_rating) values ('9', '103', '2024-03-02 20:45:00', '48.5', 'app', '4')",
"insert into restaurant_orders (order_id, customer_id, order_timestamp, order_amount, payment_method, order_rating) values ('10', '103', '2024-03-03 18:30:00', '62.0', 'card', '5')",
"insert into restaurant_orders (order_id, customer_id, order_timestamp, order_amount, payment_method, order_rating) values ('11', '104', '2024-03-01 10:00:00', '15.0', 'cash', '3')",
"insert into restaurant_orders (order_id, customer_id, order_timestamp, order_amount, payment_method, order_rating) values ('12', '104', '2024-03-02 09:30:00', '18.0', 'cash', '2')",
"insert into restaurant_orders (order_id, customer_id, order_timestamp, order_amount, payment_method, order_rating) values ('13', '104', '2024-03-03 16:00:00', '20.0', 'card', '3')",
"insert into restaurant_orders (order_id, customer_id, order_timestamp, order_amount, payment_method, order_rating) values ('14', '105', '2024-03-01 12:15:00', '30.0', 'app', '4')",
"insert into restaurant_orders (order_id, customer_id, order_timestamp, order_amount, payment_method, order_rating) values ('15', '105', '2024-03-02 13:00:00', '35.5', 'app', '5')",
"insert into restaurant_orders (order_id, customer_id, order_timestamp, order_amount, payment_method, order_rating) values ('16', '105', '2024-03-03 11:45:00', '28.0', 'card', '4')"
],
"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.2.2 and NumPy 1.26.4<\\/p>\"],\"postgresql\":[\"PostgreSQL\",\"<p>PostgreSQL 16<\\/p>\"]}",
"book": null,
"isSubscribed": false,
"isDailyQuestion": false,
"dailyRecordStatus": null,
"editorType": "CKEDITOR",
"ugcQuestionId": null,
"style": "LEETCODE",
"exampleTestcases": "{\"headers\":{\"restaurant_orders\":[\"order_id\",\"customer_id\",\"order_timestamp\",\"order_amount\",\"payment_method\",\"order_rating\"]},\"rows\":{\"restaurant_orders\":[[1,101,\"2024-03-01 12:30:00\",25.50,\"card\",5],[2,101,\"2024-03-02 19:15:00\",32.00,\"app\",4],[3,101,\"2024-03-03 13:45:00\",28.75,\"card\",5],[4,101,\"2024-03-04 20:30:00\",41.00,\"app\",null],[5,102,\"2024-03-01 11:30:00\",18.50,\"cash\",4],[6,102,\"2024-03-02 12:00:00\",22.00,\"card\",3],[7,102,\"2024-03-03 15:30:00\",19.75,\"cash\",null],[8,103,\"2024-03-01 19:00:00\",55.00,\"app\",5],[9,103,\"2024-03-02 20:45:00\",48.50,\"app\",4],[10,103,\"2024-03-03 18:30:00\",62.00,\"card\",5],[11,104,\"2024-03-01 10:00:00\",15.00,\"cash\",3],[12,104,\"2024-03-02 09:30:00\",18.00,\"cash\",2],[13,104,\"2024-03-03 16:00:00\",20.00,\"card\",3],[14,105,\"2024-03-01 12:15:00\",30.00,\"app\",4],[15,105,\"2024-03-02 13:00:00\",35.50,\"app\",5],[16,105,\"2024-03-03 11:45:00\",28.00,\"card\",4]]}}",
"__typename": "QuestionNode"
}
}
}