Back to problems

Compute CTR by format for new US users

SQL · Pinterest · Medium

An image-sharing service records impression and click counts in events. A row may be duplicated exactly in the raw data, and those duplicate rows must be collapsed so they are not counted more than once. The users table stores each account's country and registration date, and pin_classification maps each pin to its format. Write one PostgreSQL SELECT statement (CTEs are allowed) that computes click-through rate (CTR) per pin_format, using only events created by new users in…

Checking your access…