AnalystPath

Creators With Year-Over-Year Growth

SQLHardSenior level~15 min

Problem

A video platform pays creators per upload. The `Upload` table stores one row per paid upload with the date it ran and the `payout` it earned.

For each creator, consider the calendar years from the year of their first upload to the year of their last upload, inclusive. Sum the payouts within each of those years. If a creator had no uploads in some year inside that range, that year's total counts as 0.

Write a query that returns the `creator_id` of every creator whose yearly total strictly increased every year across that full range (each year strictly greater than the previous year). A creator who uploaded in only a single year trivially qualifies.

Return the result in any order. The only column is `creator_id`.

Tables

Example rows — the live problem includes the full dataset.

Upload
upload_idcreator_idrun_datepayout
112019-07-011100
212019-11-011200
312020-05-263000

Expected output

Your answer should return 1 row with the columns creator_id.

Starter code (SQL)

SELECT *
FROM Upload;

Solve this SQL question free

Write SQL and run it instantly in your browser — even on your phone. No signup needed to try.

Solution & explanation

Create a free account to unlock the optimal solution, a step-by-step explanation, and the hidden test cases that grade your answer.

Sign up free to unlock

Related SQL questions