SQL · Snowflake · Medium
All timestamps are UTC. For this task, treat today as 2025-10-15, so the reporting window is the inclusive seven-day range from 2025-10-09 00:00:00 through 2025-10-15 23:59:59. The fixed tables are users, orders, and events with the definitions below. In events, two rows are exact duplicates when their (user_id, event_ts, event_type, product_id, device_id) values all match; only one such row should be considered when counting viewers. Write a single Standard SQL query (CTEs…
Checking your access…