Cumulative revenue share: DE, android, purchase from 1500
Instructions
Consider purchases (purchases) of users from country = 'DE' with platform = 'android' whose amount is at least 1500. For each calendar month (month is the first day of the month) in which there were such purchases, compute revenue, the sum of amount. Then output cum_share_pct, the share of the cumulative revenue (from the first month through the current one inclusive) in the total revenue of all months, as a percentage, rounded to 1 decimal place. Do not output months without purchases. Columns: month, revenue, cum_share_pct. Sort by month ascending.
Hints
Each next one is more detailed and costs more
Query
Result
Click Run to see the query result, or Check to submit your solution.
Dataset schema
Table relationships
- N:1Many-to-one
events.→user_id users.id - N:1Many-to-one
purchases.→user_id users.id
Table data
Select a table in the diagram or list to view its rows.