Skip to content

Commit cb9f3b0

Browse files
authored
Create ad-free-sessions.sql
1 parent cade8de commit cb9f3b0

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

MySQL/ad-free-sessions.sql

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Time: O(n)
2+
# Space: O(n)
3+
4+
SELECT p.session_id
5+
FROM playback p
6+
LEFT JOIN ads a
7+
ON p.customer_id = a.customer_id
8+
AND a.timestamp BETWEEN p.start_time AND p.end_time
9+
WHERE a.customer_id IS NULL;

0 commit comments

Comments
 (0)