Data EngineerQuestion 16 of 55
Deduplicating logs (ROW_NUMBER)
Problem
Your event collector accidentally logged some clicks twice due to network retries. You need to keep only the earliest click event for each unique session. Write a query that outputs strategy with the value: "To deduplicate, partition by unique keys, calculate ROW_NUMBER() ordered by timestamp, and select only rows where the rank is 1."
Database Schema
This problem acts as a scratchpad. You will write your own DDL/DML or conceptual queries, so there is no predefined schema.
Try It
Loading playground environment...