You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
这张表包含 user id, session start, session end, session id 和 session 类型。
26
26
</pre>
27
27
28
-
<p>Write a solution to find the the <strong>users</strong> who have had <strong>at least one</strong><strong>consecutive session</strong> of the <strong>same</strong> type (either '<strong>Viewer</strong>' or '<strong>Streamer</strong>') with a <strong>maximum</strong> gap of <code>12</code> hours <strong>between</strong> sessions.</p>
- User ID 101 will not be included in the final output as they do not have any consecutive sessions of the same session type.
64
-
- User ID 102 will be included in the final output as they had two viewer sessions with session IDs 3 and 4, respectively, and the time gap between them was less than 12 hours.
65
-
- User ID 103 participated in two viewer sessions with a gap of less than 12 hours between them, identified by session IDs 10 and 11. Therefore, user 103 will be included in the final output.
66
-
Output table is ordered by user_id in increasing order.
63
+
<strong>解释:</strong>
64
+
- 用户 ID 101 将不会包含在最终输出中,因为他们没有相同会话类型的连续回话。
65
+
- 用户 ID 102 将会包含在最终输出中,因为他们分别有两个 session ID 为 3 和 4 的 viewer 会话,并且时间间隔在 12 小时内。
66
+
- 用户 ID 103 参与了两次 viewer 会话,间隔不到 12 小时,会话 ID 为 10 和 11。因此,用户 103 将会被包含在最终输出中。
0 commit comments