AnalystPath

First-Touch Attribution Revenue

SQLHardSenior levelGoogle~15 min

Problem

**[Asked at Google]**

The first marketing channel that touched a user gets full credit for their conversion revenue.

Return `channel` and `attributed_revenue`, ordered by revenue descending.

Tables

Example rows — the live problem includes the full dataset.

touches
touch_iduser_idchanneltouch_date
conversions
conversion_iduser_idrevenue

Expected output

Your answer should return 3 rows with the columns channel, attributed_revenue.

Starter code (SQL)

SELECT *
FROM touches;

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