1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-10-12 17:05:15 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
Files
leetcode-problemset/leetcode-cn/originData/find-zombie-sessions.json
2025-09-29 14:43:44 +08:00

108 lines
26 KiB
JSON
Raw Permalink Blame History

This file contains ambiguous Unicode characters

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": "4043",
"questionFrontendId": "3673",
"categoryTitle": "Database",
"boundTopicId": 3774328,
"title": "Find Zombie Sessions",
"titleSlug": "find-zombie-sessions",
"content": "<p>Table: <code>app_events</code></p>\n\n<pre>\n+------------------+----------+\n| Column Name | Type | \n+------------------+----------+\n| event_id | int |\n| user_id | int |\n| event_timestamp | datetime |\n| event_type | varchar |\n| session_id | varchar |\n| event_value | int |\n+------------------+----------+\nevent_id is the unique identifier for this table.\nevent_type can be app_open, click, scroll, purchase, or app_close.\nsession_id groups events within the same user session.\nevent_value represents: for purchase - amount in dollars, for scroll - pixels scrolled, for others - NULL.\n</pre>\n\n<p>Write a solution to identify <strong>zombie sessions,&nbsp;</strong>sessions where users appear active but show abnormal behavior patterns. A session is considered a <strong>zombie session</strong> if it meets ALL the following criteria:</p>\n\n<ul>\n\t<li>The session duration is <strong>more than</strong> <code>30</code> minutes.</li>\n\t<li>Has <strong>at least</strong> <code>5</code> scroll events.</li>\n\t<li>The <strong>click-to-scroll ratio</strong> is less than <code>0.20</code> .</li>\n\t<li><strong>No purchases</strong> were made during the session.</li>\n</ul>\n\n<p>Return <em>the result table ordered by</em>&nbsp;<code>scroll_count</code> <em>in <strong>descending</strong> order, then by</em> <code>session_id</code> <em>in <strong>ascending</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>app_events table:</p>\n\n<pre class=\"example-io\">\n+----------+---------+---------------------+------------+------------+-------------+\n| event_id | user_id | event_timestamp | event_type | session_id | event_value |\n+----------+---------+---------------------+------------+------------+-------------+\n| 1 | 201 | 2024-03-01 10:00:00 | app_open | S001 | NULL |\n| 2 | 201 | 2024-03-01 10:05:00 | scroll | S001 | 500 |\n| 3 | 201 | 2024-03-01 10:10:00 | scroll | S001 | 750 |\n| 4 | 201 | 2024-03-01 10:15:00 | scroll | S001 | 600 |\n| 5 | 201 | 2024-03-01 10:20:00 | scroll | S001 | 800 |\n| 6 | 201 | 2024-03-01 10:25:00 | scroll | S001 | 550 |\n| 7 | 201 | 2024-03-01 10:30:00 | scroll | S001 | 900 |\n| 8 | 201 | 2024-03-01 10:35:00 | app_close | S001 | NULL |\n| 9 | 202 | 2024-03-01 11:00:00 | app_open | S002 | NULL |\n| 10 | 202 | 2024-03-01 11:02:00 | click | S002 | NULL |\n| 11 | 202 | 2024-03-01 11:05:00 | scroll | S002 | 400 |\n| 12 | 202 | 2024-03-01 11:08:00 | click | S002 | NULL |\n| 13 | 202 | 2024-03-01 11:10:00 | scroll | S002 | 350 |\n| 14 | 202 | 2024-03-01 11:15:00 | purchase | S002 | 50 |\n| 15 | 202 | 2024-03-01 11:20:00 | app_close | S002 | NULL |\n| 16 | 203 | 2024-03-01 12:00:00 | app_open | S003 | NULL |\n| 17 | 203 | 2024-03-01 12:10:00 | scroll | S003 | 1000 |\n| 18 | 203 | 2024-03-01 12:20:00 | scroll | S003 | 1200 |\n| 19 | 203 | 2024-03-01 12:25:00 | click | S003 | NULL |\n| 20 | 203 | 2024-03-01 12:30:00 | scroll | S003 | 800 |\n| 21 | 203 | 2024-03-01 12:40:00 | scroll | S003 | 900 |\n| 22 | 203 | 2024-03-01 12:50:00 | scroll | S003 | 1100 |\n| 23 | 203 | 2024-03-01 13:00:00 | app_close | S003 | NULL |\n| 24 | 204 | 2024-03-01 14:00:00 | app_open | S004 | NULL |\n| 25 | 204 | 2024-03-01 14:05:00 | scroll | S004 | 600 |\n| 26 | 204 | 2024-03-01 14:08:00 | scroll | S004 | 700 |\n| 27 | 204 | 2024-03-01 14:10:00 | click | S004 | NULL |\n| 28 | 204 | 2024-03-01 14:12:00 | app_close | S004 | NULL |\n+----------+---------+---------------------+------------+------------+-------------+\n</pre>\n\n<p><strong>Output:</strong></p>\n\n<pre class=\"example-io\">\n+------------+---------+--------------------------+--------------+\n| session_id | user_id | session_duration_minutes | scroll_count |\n+------------+---------+--------------------------+--------------+\n| S001 | 201 | 35 | 6 |\n+------------+---------+--------------------------+--------------+\n</pre>\n\n<p><strong>Explanation:</strong></p>\n\n<ul>\n\t<li><strong>Session S001 (User 201)</strong>:\n\n\t<ul>\n\t\t<li>Duration: 10:00:00 to 10:35:00 = 35 minutes (more than 30)&nbsp;</li>\n\t\t<li>Scroll events: 6 (at least 5)&nbsp;</li>\n\t\t<li>Click events: 0</li>\n\t\t<li>Click-to-scroll ratio: 0/6 = 0.00 (less than 0.20)&nbsp;</li>\n\t\t<li>Purchases: 0 (no purchases)&nbsp;</li>\n\t\t<li>S001 is a zombie session (meets all criteria)</li>\n\t</ul>\n\t</li>\n\t<li><strong>Session S002 (User 202)</strong>:\n\t<ul>\n\t\t<li>Duration: 11:00:00 to 11:20:00 = 20 minutes (less than 30)&nbsp;</li>\n\t\t<li>Has a purchase event&nbsp;</li>\n\t\t<li>S002 is&nbsp;not a zombie session&nbsp;</li>\n\t</ul>\n\t</li>\n\t<li><strong>Session S003 (User 203)</strong>:\n\t<ul>\n\t\t<li>Duration: 12:00:00 to 13:00:00 = 60 minutes (more than 30)&nbsp;</li>\n\t\t<li>Scroll events: 5 (at least 5)&nbsp;</li>\n\t\t<li>Click events: 1</li>\n\t\t<li>Click-to-scroll ratio: 1/5 = 0.20 (not less than 0.20)&nbsp;</li>\n\t\t<li>Purchases: 0 (no purchases)&nbsp;</li>\n\t\t<li>S003 is&nbsp;not a zombie session (click-to-scroll ratio equals 0.20, needs to be less)</li>\n\t</ul>\n\t</li>\n\t<li><strong>Session S004 (User 204)</strong>:\n\t<ul>\n\t\t<li>Duration: 14:00:00 to 14:12:00 = 12 minutes (less than 30)&nbsp;</li>\n\t\t<li>Scroll events: 2 (less than 5)&nbsp;</li>\n\t\t<li>S004&nbsp; is not a zombie session&nbsp;</li>\n\t</ul>\n\t</li>\n</ul>\n\n<p>The result table is ordered by scroll_count in descending order, then by session_id in ascending order.</p>\n</div>\n",
"translatedTitle": "查找僵尸会话",
"translatedContent": "<p>表:<code>app_events</code></p>\n\n<pre>\n+------------------+----------+\n| Column Name | Type | \n+------------------+----------+\n| event_id | int |\n| user_id | int |\n| event_timestamp | datetime |\n| event_type | varchar |\n| session_id | varchar |\n| event_value | int |\n+------------------+----------+\nevent_id 是这张表的唯一主键。\nevent_type 可以是 app_openclickscrollpurchase 或 app_close。\nsession_id 将事件按同一用户会话分组。\nevent_value 表示:对于 purchase - 美元金额,对于 scroll - 滚动的像素数,对于其它 - NULL。\n</pre>\n\n<p>编写一个解决方案来识别 <strong>僵尸会话</strong>,即用户看似活跃但表现出异常行为模式的会话。如果会话满足以下所有条件,则被视为 <strong>僵尸会话</strong></p>\n\n<ul>\n\t<li>会话时长&nbsp;<strong>超过</strong>&nbsp;<code>30</code>&nbsp;分钟。</li>\n\t<li>至少有 <code>5</code> 次滚动事件。</li>\n\t<li>点击滚动比率低于 <code>0.20</code>。</li>\n\t<li>会话期间 <strong>没有进行任何购买</strong>。</li>\n</ul>\n\n<p>返回结果表按&nbsp;<code>scroll_count</code> <strong>降序</strong>&nbsp;排序,然后按&nbsp;<code>session_id</code> <strong>升序</strong>&nbsp;排序。</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><strong>输入:</strong></p>\n\n<p>app_events 表:</p>\n\n<pre class=\"example-io\">\n+----------+---------+---------------------+------------+------------+-------------+\n| event_id | user_id | event_timestamp | event_type | session_id | event_value |\n+----------+---------+---------------------+------------+------------+-------------+\n| 1 | 201 | 2024-03-01 10:00:00 | app_open | S001 | NULL |\n| 2 | 201 | 2024-03-01 10:05:00 | scroll | S001 | 500 |\n| 3 | 201 | 2024-03-01 10:10:00 | scroll | S001 | 750 |\n| 4 | 201 | 2024-03-01 10:15:00 | scroll | S001 | 600 |\n| 5 | 201 | 2024-03-01 10:20:00 | scroll | S001 | 800 |\n| 6 | 201 | 2024-03-01 10:25:00 | scroll | S001 | 550 |\n| 7 | 201 | 2024-03-01 10:30:00 | scroll | S001 | 900 |\n| 8 | 201 | 2024-03-01 10:35:00 | app_close | S001 | NULL |\n| 9 | 202 | 2024-03-01 11:00:00 | app_open | S002 | NULL |\n| 10 | 202 | 2024-03-01 11:02:00 | click | S002 | NULL |\n| 11 | 202 | 2024-03-01 11:05:00 | scroll | S002 | 400 |\n| 12 | 202 | 2024-03-01 11:08:00 | click | S002 | NULL |\n| 13 | 202 | 2024-03-01 11:10:00 | scroll | S002 | 350 |\n| 14 | 202 | 2024-03-01 11:15:00 | purchase | S002 | 50 |\n| 15 | 202 | 2024-03-01 11:20:00 | app_close | S002 | NULL |\n| 16 | 203 | 2024-03-01 12:00:00 | app_open | S003 | NULL |\n| 17 | 203 | 2024-03-01 12:10:00 | scroll | S003 | 1000 |\n| 18 | 203 | 2024-03-01 12:20:00 | scroll | S003 | 1200 |\n| 19 | 203 | 2024-03-01 12:25:00 | click | S003 | NULL |\n| 20 | 203 | 2024-03-01 12:30:00 | scroll | S003 | 800 |\n| 21 | 203 | 2024-03-01 12:40:00 | scroll | S003 | 900 |\n| 22 | 203 | 2024-03-01 12:50:00 | scroll | S003 | 1100 |\n| 23 | 203 | 2024-03-01 13:00:00 | app_close | S003 | NULL |\n| 24 | 204 | 2024-03-01 14:00:00 | app_open | S004 | NULL |\n| 25 | 204 | 2024-03-01 14:05:00 | scroll | S004 | 600 |\n| 26 | 204 | 2024-03-01 14:08:00 | scroll | S004 | 700 |\n| 27 | 204 | 2024-03-01 14:10:00 | click | S004 | NULL |\n| 28 | 204 | 2024-03-01 14:12:00 | app_close | S004 | NULL |\n+----------+---------+---------------------+------------+------------+-------------+\n</pre>\n\n<p><strong>输出:</strong></p>\n\n<pre class=\"example-io\">\n+------------+---------+--------------------------+--------------+\n| session_id | user_id | session_duration_minutes | scroll_count |\n+------------+---------+--------------------------+--------------+\n| S001 | 201 | 35 | 6 |\n+------------+---------+--------------------------+--------------+\n</pre>\n\n<p><strong>解释:</strong></p>\n\n<ul>\n\t<li><strong>会话 S001 (User 201)</strong>:\n\n\t<ul>\n\t\t<li>时长10:00:00 到 10:35:00 = 35 分钟(大于 30 分钟)</li>\n\t\t<li>滚动事件6至少 5 次)</li>\n\t\t<li>点击事件0</li>\n\t\t<li>点击滚动比率0/6 = 0.00(少于 0.20</li>\n\t\t<li>购买数0没有购买</li>\n\t\t<li>S001 是一个僵尸会话(满足所有条件)</li>\n\t</ul>\n\t</li>\n\t<li><strong>会话 S002 (User 202)</strong>:\n\t<ul>\n\t\t<li>时长11:00:00 到 11:20:00 = 20 分钟(少于 30 分钟)</li>\n\t\t<li>有一次购买事件</li>\n\t\t<li>S002 不是一个僵尸会话</li>\n\t</ul>\n\t</li>\n\t<li><strong>会话 S003 (User 203)</strong>:\n\t<ul>\n\t\t<li>时长12:00:00 到 13:00:00 = 60 分钟(超过 30 分钟)</li>\n\t\t<li>滚动事件5至少 5 次)</li>\n\t\t<li>点击事件1</li>\n\t\t<li>点击滚动比率1/5 = 0.20(不少于 0.20</li>\n\t\t<li>购买数0没有购买</li>\n\t\t<li>S003 不是一个僵尸会话(点击滚动比率等于 0.20,需要更少)。</li>\n\t</ul>\n\t</li>\n\t<li><strong>会话 S004 (User 204)</strong>:\n\t<ul>\n\t\t<li>时长14:00:00 到 14:12:00 = 12 分钟(少于 30 分钟)</li>\n\t\t<li>滚动事件2少于&nbsp;5 次)</li>\n\t\t<li>S004&nbsp; 不是一个僵尸会话</li>\n\t</ul>\n\t</li>\n</ul>\n\n<p>结果表按 scroll_count 降序排序,然后按 session_id 升序排序。</p>\n</div>\n",
"isPaidOnly": false,
"difficulty": "Hard",
"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_zombie_sessions(app_events: pd.DataFrame) -> pd.DataFrame:\n ",
"__typename": "CodeSnippetNode"
}
],
"stats": "{\"totalAccepted\": \"286\", \"totalSubmission\": \"459\", \"totalAcceptedRaw\": 286, \"totalSubmissionRaw\": 459, \"acRate\": \"62.3%\"}",
"hints": [],
"solution": null,
"status": null,
"sampleTestCase": "{\"headers\":{\"app_events\":[\"event_id\",\"user_id\",\"event_timestamp\",\"event_type\",\"session_id\",\"event_value\"]},\"rows\":{\"app_events\":[[1,201,\"2024-03-01 10:00:00\",\"app_open\",\"S001\",null],[2,201,\"2024-03-01 10:05:00\",\"scroll\",\"S001\",500],[3,201,\"2024-03-01 10:10:00\",\"scroll\",\"S001\",750],[4,201,\"2024-03-01 10:15:00\",\"scroll\",\"S001\",600],[5,201,\"2024-03-01 10:20:00\",\"scroll\",\"S001\",800],[6,201,\"2024-03-01 10:25:00\",\"scroll\",\"S001\",550],[7,201,\"2024-03-01 10:30:00\",\"scroll\",\"S001\",900],[8,201,\"2024-03-01 10:35:00\",\"app_close\",\"S001\",null],[9,202,\"2024-03-01 11:00:00\",\"app_open\",\"S002\",null],[10,202,\"2024-03-01 11:02:00\",\"click\",\"S002\",null],[11,202,\"2024-03-01 11:05:00\",\"scroll\",\"S002\",400],[12,202,\"2024-03-01 11:08:00\",\"click\",\"S002\",null],[13,202,\"2024-03-01 11:10:00\",\"scroll\",\"S002\",350],[14,202,\"2024-03-01 11:15:00\",\"purchase\",\"S002\",50],[15,202,\"2024-03-01 11:20:00\",\"app_close\",\"S002\",null],[16,203,\"2024-03-01 12:00:00\",\"app_open\",\"S003\",null],[17,203,\"2024-03-01 12:10:00\",\"scroll\",\"S003\",1000],[18,203,\"2024-03-01 12:20:00\",\"scroll\",\"S003\",1200],[19,203,\"2024-03-01 12:25:00\",\"click\",\"S003\",null],[20,203,\"2024-03-01 12:30:00\",\"scroll\",\"S003\",800],[21,203,\"2024-03-01 12:40:00\",\"scroll\",\"S003\",900],[22,203,\"2024-03-01 12:50:00\",\"scroll\",\"S003\",1100],[23,203,\"2024-03-01 13:00:00\",\"app_close\",\"S003\",null],[24,204,\"2024-03-01 14:00:00\",\"app_open\",\"S004\",null],[25,204,\"2024-03-01 14:05:00\",\"scroll\",\"S004\",600],[26,204,\"2024-03-01 14:08:00\",\"scroll\",\"S004\",700],[27,204,\"2024-03-01 14:10:00\",\"click\",\"S004\",null],[28,204,\"2024-03-01 14:12:00\",\"app_close\",\"S004\",null]]}}",
"metaData": "{\"mysql\":[\"CREATE TABLE app_events (\\n event_id INT,\\n user_id INT,\\n event_timestamp DATETIME,\\n event_type VARCHAR(20),\\n session_id VARCHAR(10),\\n event_value INT\\n)\"],\"mssql\":[\"CREATE TABLE app_events (\\n event_id INT,\\n user_id INT,\\n event_timestamp DATETIME,\\n event_type VARCHAR(20),\\n session_id VARCHAR(10),\\n event_value INT\\n)\"],\"oraclesql\":[\"CREATE TABLE app_events (\\n event_id NUMBER,\\n user_id NUMBER,\\n event_timestamp Date,\\n event_type VARCHAR2(20),\\n session_id VARCHAR2(10),\\n event_value NUMBER\\n)\",\"ALTER SESSION SET nls_date_format='YYYY-MM-DD HH24:MI:SS'\"],\"database\":true,\"name\":\"find_zombie_sessions\",\"postgresql\":[\"CREATE TABLE app_events (\\n event_id INT PRIMARY KEY,\\n user_id INT,\\n event_timestamp TIMESTAMP,\\n event_type VARCHAR(20),\\n session_id VARCHAR(10),\\n event_value INT\\n);\\n\"],\"pythondata\":[\"app_events = pd.DataFrame({\\n \\\"event_id\\\": pd.Series(dtype=\\\"int\\\"),\\n \\\"user_id\\\": pd.Series(dtype=\\\"int\\\"),\\n \\\"event_timestamp\\\": pd.Series(dtype=\\\"datetime64[ns]\\\"),\\n \\\"event_type\\\": pd.Series(dtype=\\\"string\\\"), # varchar -> string\\n \\\"session_id\\\": pd.Series(dtype=\\\"string\\\"), # varchar -> string\\n \\\"event_value\\\": pd.Series(dtype=\\\"int\\\")\\n})\"],\"database_schema\":{\"app_events\":{\"event_id\":\"INT\",\"user_id\":\"INT\",\"event_timestamp\":\"DATETIME\",\"event_type\":\"VARCHAR(20)\",\"session_id\":\"VARCHAR(10)\",\"event_value\":\"INT\"}}}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [
"CREATE TABLE app_events (\n event_id INT,\n user_id INT,\n event_timestamp DATETIME,\n event_type VARCHAR(20),\n session_id VARCHAR(10),\n event_value INT\n)",
"Truncate table app_events",
"insert into app_events (event_id, user_id, event_timestamp, event_type, session_id, event_value) values ('1', '201', '2024-03-01 10:00:00', 'app_open', 'S001', NULL)",
"insert into app_events (event_id, user_id, event_timestamp, event_type, session_id, event_value) values ('2', '201', '2024-03-01 10:05:00', 'scroll', 'S001', '500')",
"insert into app_events (event_id, user_id, event_timestamp, event_type, session_id, event_value) values ('3', '201', '2024-03-01 10:10:00', 'scroll', 'S001', '750')",
"insert into app_events (event_id, user_id, event_timestamp, event_type, session_id, event_value) values ('4', '201', '2024-03-01 10:15:00', 'scroll', 'S001', '600')",
"insert into app_events (event_id, user_id, event_timestamp, event_type, session_id, event_value) values ('5', '201', '2024-03-01 10:20:00', 'scroll', 'S001', '800')",
"insert into app_events (event_id, user_id, event_timestamp, event_type, session_id, event_value) values ('6', '201', '2024-03-01 10:25:00', 'scroll', 'S001', '550')",
"insert into app_events (event_id, user_id, event_timestamp, event_type, session_id, event_value) values ('7', '201', '2024-03-01 10:30:00', 'scroll', 'S001', '900')",
"insert into app_events (event_id, user_id, event_timestamp, event_type, session_id, event_value) values ('8', '201', '2024-03-01 10:35:00', 'app_close', 'S001', NULL)",
"insert into app_events (event_id, user_id, event_timestamp, event_type, session_id, event_value) values ('9', '202', '2024-03-01 11:00:00', 'app_open', 'S002', NULL)",
"insert into app_events (event_id, user_id, event_timestamp, event_type, session_id, event_value) values ('10', '202', '2024-03-01 11:02:00', 'click', 'S002', NULL)",
"insert into app_events (event_id, user_id, event_timestamp, event_type, session_id, event_value) values ('11', '202', '2024-03-01 11:05:00', 'scroll', 'S002', '400')",
"insert into app_events (event_id, user_id, event_timestamp, event_type, session_id, event_value) values ('12', '202', '2024-03-01 11:08:00', 'click', 'S002', NULL)",
"insert into app_events (event_id, user_id, event_timestamp, event_type, session_id, event_value) values ('13', '202', '2024-03-01 11:10:00', 'scroll', 'S002', '350')",
"insert into app_events (event_id, user_id, event_timestamp, event_type, session_id, event_value) values ('14', '202', '2024-03-01 11:15:00', 'purchase', 'S002', '50')",
"insert into app_events (event_id, user_id, event_timestamp, event_type, session_id, event_value) values ('15', '202', '2024-03-01 11:20:00', 'app_close', 'S002', NULL)",
"insert into app_events (event_id, user_id, event_timestamp, event_type, session_id, event_value) values ('16', '203', '2024-03-01 12:00:00', 'app_open', 'S003', NULL)",
"insert into app_events (event_id, user_id, event_timestamp, event_type, session_id, event_value) values ('17', '203', '2024-03-01 12:10:00', 'scroll', 'S003', '1000')",
"insert into app_events (event_id, user_id, event_timestamp, event_type, session_id, event_value) values ('18', '203', '2024-03-01 12:20:00', 'scroll', 'S003', '1200')",
"insert into app_events (event_id, user_id, event_timestamp, event_type, session_id, event_value) values ('19', '203', '2024-03-01 12:25:00', 'click', 'S003', NULL)",
"insert into app_events (event_id, user_id, event_timestamp, event_type, session_id, event_value) values ('20', '203', '2024-03-01 12:30:00', 'scroll', 'S003', '800')",
"insert into app_events (event_id, user_id, event_timestamp, event_type, session_id, event_value) values ('21', '203', '2024-03-01 12:40:00', 'scroll', 'S003', '900')",
"insert into app_events (event_id, user_id, event_timestamp, event_type, session_id, event_value) values ('22', '203', '2024-03-01 12:50:00', 'scroll', 'S003', '1100')",
"insert into app_events (event_id, user_id, event_timestamp, event_type, session_id, event_value) values ('23', '203', '2024-03-01 13:00:00', 'app_close', 'S003', NULL)",
"insert into app_events (event_id, user_id, event_timestamp, event_type, session_id, event_value) values ('24', '204', '2024-03-01 14:00:00', 'app_open', 'S004', NULL)",
"insert into app_events (event_id, user_id, event_timestamp, event_type, session_id, event_value) values ('25', '204', '2024-03-01 14:05:00', 'scroll', 'S004', '600')",
"insert into app_events (event_id, user_id, event_timestamp, event_type, session_id, event_value) values ('26', '204', '2024-03-01 14:08:00', 'scroll', 'S004', '700')",
"insert into app_events (event_id, user_id, event_timestamp, event_type, session_id, event_value) values ('27', '204', '2024-03-01 14:10:00', 'click', 'S004', NULL)",
"insert into app_events (event_id, user_id, event_timestamp, event_type, session_id, event_value) values ('28', '204', '2024-03-01 14:12:00', 'app_close', 'S004', NULL)"
],
"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\":{\"app_events\":[\"event_id\",\"user_id\",\"event_timestamp\",\"event_type\",\"session_id\",\"event_value\"]},\"rows\":{\"app_events\":[[1,201,\"2024-03-01 10:00:00\",\"app_open\",\"S001\",null],[2,201,\"2024-03-01 10:05:00\",\"scroll\",\"S001\",500],[3,201,\"2024-03-01 10:10:00\",\"scroll\",\"S001\",750],[4,201,\"2024-03-01 10:15:00\",\"scroll\",\"S001\",600],[5,201,\"2024-03-01 10:20:00\",\"scroll\",\"S001\",800],[6,201,\"2024-03-01 10:25:00\",\"scroll\",\"S001\",550],[7,201,\"2024-03-01 10:30:00\",\"scroll\",\"S001\",900],[8,201,\"2024-03-01 10:35:00\",\"app_close\",\"S001\",null],[9,202,\"2024-03-01 11:00:00\",\"app_open\",\"S002\",null],[10,202,\"2024-03-01 11:02:00\",\"click\",\"S002\",null],[11,202,\"2024-03-01 11:05:00\",\"scroll\",\"S002\",400],[12,202,\"2024-03-01 11:08:00\",\"click\",\"S002\",null],[13,202,\"2024-03-01 11:10:00\",\"scroll\",\"S002\",350],[14,202,\"2024-03-01 11:15:00\",\"purchase\",\"S002\",50],[15,202,\"2024-03-01 11:20:00\",\"app_close\",\"S002\",null],[16,203,\"2024-03-01 12:00:00\",\"app_open\",\"S003\",null],[17,203,\"2024-03-01 12:10:00\",\"scroll\",\"S003\",1000],[18,203,\"2024-03-01 12:20:00\",\"scroll\",\"S003\",1200],[19,203,\"2024-03-01 12:25:00\",\"click\",\"S003\",null],[20,203,\"2024-03-01 12:30:00\",\"scroll\",\"S003\",800],[21,203,\"2024-03-01 12:40:00\",\"scroll\",\"S003\",900],[22,203,\"2024-03-01 12:50:00\",\"scroll\",\"S003\",1100],[23,203,\"2024-03-01 13:00:00\",\"app_close\",\"S003\",null],[24,204,\"2024-03-01 14:00:00\",\"app_open\",\"S004\",null],[25,204,\"2024-03-01 14:05:00\",\"scroll\",\"S004\",600],[26,204,\"2024-03-01 14:08:00\",\"scroll\",\"S004\",700],[27,204,\"2024-03-01 14:10:00\",\"click\",\"S004\",null],[28,204,\"2024-03-01 14:12:00\",\"app_close\",\"S004\",null]]}}",
"__typename": "QuestionNode"
}
}
}