Back to problems

Write SQL for snapshot features and labels

SQL · Stripe · Hard

You are building a point-in-time snapshot dataset from user activity and purchase records. All timestamps are stored in UTC. Use the fixed observation point snapshot_ts = '2025-11-01 00:00:00'. You are given three tables: customers(uid INT, signup_date DATE, country VARCHAR(2)) activity(uid INT, occurred_at TIMESTAMP, landed_at TIMESTAMP, activity_type VARCHAR(50), session_uid VARCHAR(50)) occurred_at is when the action happened. landed_at is when the row became visible in…

Checking your access…