Linear Multi-Touch Attribution
Problem
**[Asked at Google]**
Linear attribution **splits conversion revenue equally** across every channel
that touched a user.
Return `channel` and `attributed_revenue` (rounded to 2 dp),
ordered by attributed_revenue descending.
Tables
Example rows — the live problem includes the full dataset.
touches
| touch_id | user_id | channel | touch_date |
|---|
conversions
| conversion_id | user_id | revenue |
|---|
Expected output
Your answer should return 4 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