Always Excited Users
Start Timer
0:00:00
Let’s say you work at an advertising firm. You have a table of users’ impressions of ad campaigns over time. Each impression_id consists of values of user engagement specified by Excited, OK, and Bored.
Write a query to find all users who were at some point “Excited” and have never been “Bored” with a campaign.
Example:
Input:
ad_impressions table:
| Column | Type |
|---|---|
user_id |
INTEGER |
dt |
DATETIME |
campaign_id |
INTEGER |
impression_id |
TEXT |
Output:
| Column | Type |
|---|---|
user_id |
INTEGER |
.
.
.
.
.
.
.
.
.
Comments