Interview Query

Best Performing Advertisers

Start Timer

0:00:00

Upvote
2
Downvote
Save question
Mark as completed
View comments (12)
Next question

Find the three best-performing days ever recorded for each advertiser who achieved the highest weekly revenue in 2021.

Note:

You may assume that all the transactions happened in 2021.

You may assume that every record within the amount column is different.

advertisers table

Column Type
advertiser_id INTEGER
advertiser_name TEXT

revenue table

Column Type
payment_id INTEGER
advertiser_id INTEGER
transaction_date DATE
amount INTEGER

Output:

Column Type
advertiser_name INTEGER
transaction_date DATE
amount INTEGER
.
.
.
.
.


Comments

Loading comments