task Segmentation & ranking · hard
Upgrade review 5: which channels to fix first
For Q2 2025 logical checkouts, return acquisition_channel (of the workspace), checkouts, converted (subscription within 24 hours), lost (checkouts − converted) and priority: RANK by lost descending.
what to return
- Columns
acquisition_channelcheckoutsconvertedlostpriorityin this order- Rows
- 6 rows · any order
- Watch for
- Every stage starts from the original tables; recompute what you need.
- Use one delivery per event_id: the earliest received_at, ties by the lowest delivery_id.
- Times are UTC. The checkout window is checkout_started at or after pricing_viewed, then subscription_started for the same workspace within 24 hours after checkout.
- Skill
- Prioritize by impact, not only by rate. Refresher: RANK & DENSE_RANK →
expected result
Your query should return exactly these columns and values. Run it and compare.
| acquisition_channel | checkouts | converted | lost | priority |
|---|---|---|---|---|
| organic | 135 | 107 | 28 | 1 |
| paid_search | 103 | 85 | 18 | 2 |
| referral | 62 | 48 | 14 | 3 |
first 3 of 6 rows
data you can query
Product / SaaS Analytics dataset: the first 6 rows of each table. Under each column name: the kind of value it holds, and which table it links to. Your queries run on all rows.
events8 columns · 135,428 rows
| delivery_idnumber · unique id | event_idtext | user_idnumber · links to users | account_idnumber · links to accounts | session_idnumber · links to sessions | event_nametext | occurred_atdate & time | received_atdate & time |
|---|---|---|---|---|---|---|---|
| 1 | evt_0000001 | 1 | 1 | 1 | user_signed_up | 2024-01-14 18:52:14 | 2024-01-14 18:52:33 |
| 2 | evt_0000002 | 1 | 1 | 1 | onboarding_started | 2024-01-14 18:52:51 | 2024-01-14 18:53:06 |
| 3 | evt_0000084 | 6 | 2 | 32 | user_signed_up | 2024-01-15 13:21:52 | 2024-01-15 13:22:00 |
| 4 | evt_0000085 | 6 | 2 | 32 | onboarding_started | 2024-01-15 13:22:05 | 2024-01-15 13:22:16 |
| 5 | evt_0000086 | 6 | 2 | 32 | onboarding_completed | 2024-01-15 13:23:52 | 2024-01-15 13:24:12 |
| 6 | evt_0000019 | 1 | 1 | 9 | search_performed | 2024-01-17 20:56:55 | 2024-01-17 20:56:59 |
- delivery_idnumber · unique id
- 1
- event_idtext
- evt_0000001
- user_idnumber · links to users
- 1
- account_idnumber · links to accounts
- 1
- session_idnumber · links to sessions
- 1
- event_nametext
- user_signed_up
- occurred_atdate & time
- 2024-01-14 18:52:14
- received_atdate & time
- 2024-01-14 18:52:33
- delivery_idnumber · unique id
- 2
- event_idtext
- evt_0000002
- user_idnumber · links to users
- 1
- account_idnumber · links to accounts
- 1
- session_idnumber · links to sessions
- 1
- event_nametext
- onboarding_started
- occurred_atdate & time
- 2024-01-14 18:52:51
- received_atdate & time
- 2024-01-14 18:53:06
- delivery_idnumber · unique id
- 3
- event_idtext
- evt_0000084
- user_idnumber · links to users
- 6
- account_idnumber · links to accounts
- 2
- session_idnumber · links to sessions
- 32
- event_nametext
- user_signed_up
- occurred_atdate & time
- 2024-01-15 13:21:52
- received_atdate & time
- 2024-01-15 13:22:00
- delivery_idnumber · unique id
- 4
- event_idtext
- evt_0000085
- user_idnumber · links to users
- 6
- account_idnumber · links to accounts
- 2
- session_idnumber · links to sessions
- 32
- event_nametext
- onboarding_started
- occurred_atdate & time
- 2024-01-15 13:22:05
- received_atdate & time
- 2024-01-15 13:22:16
- delivery_idnumber · unique id
- 5
- event_idtext
- evt_0000086
- user_idnumber · links to users
- 6
- account_idnumber · links to accounts
- 2
- session_idnumber · links to sessions
- 32
- event_nametext
- onboarding_completed
- occurred_atdate & time
- 2024-01-15 13:23:52
- received_atdate & time
- 2024-01-15 13:24:12
- delivery_idnumber · unique id
- 6
- event_idtext
- evt_0000019
- user_idnumber · links to users
- 1
- account_idnumber · links to accounts
- 1
- session_idnumber · links to sessions
- 9
- event_nametext
- search_performed
- occurred_atdate & time
- 2024-01-17 20:56:55
- received_atdate & time
- 2024-01-17 20:56:59
first 6 of 135,428 rows · your queries use all of them
accounts7 columns · 3,200 rows
| account_idnumber · unique id | account_nametext | industrytext | company_sizetext | countrytext | acquisition_channeltext | created_atdate & time |
|---|---|---|---|---|---|---|
| 1 | Iron Capital Inc | Logistics | 11-50 | United States | organic | 2024-01-14 18:52:14 |
| 2 | Vector Data Co | Nonprofit | 51-200 | United Kingdom | social | 2024-01-15 13:21:52 |
| 3 | True Foods Inc | Healthcare | 201-1000 | United States | outbound_sales | 2024-01-19 11:22:02 |
| 4 | Meridian Works | Software | 11-50 | United States | organic | 2024-01-23 23:42:36 |
| 5 | Prism Health Group | Software | 1-10 | Germany | referral | 2024-01-25 11:43:43 |
| 6 | Beacon Supply Ltd | Media | 1000+ | United Kingdom | organic | 2024-01-27 20:19:28 |
- account_idnumber · unique id
- 1
- account_nametext
- Iron Capital Inc
- industrytext
- Logistics
- company_sizetext
- 11-50
- countrytext
- United States
- acquisition_channeltext
- organic
- created_atdate & time
- 2024-01-14 18:52:14
- account_idnumber · unique id
- 2
- account_nametext
- Vector Data Co
- industrytext
- Nonprofit
- company_sizetext
- 51-200
- countrytext
- United Kingdom
- acquisition_channeltext
- social
- created_atdate & time
- 2024-01-15 13:21:52
- account_idnumber · unique id
- 3
- account_nametext
- True Foods Inc
- industrytext
- Healthcare
- company_sizetext
- 201-1000
- countrytext
- United States
- acquisition_channeltext
- outbound_sales
- created_atdate & time
- 2024-01-19 11:22:02
- account_idnumber · unique id
- 4
- account_nametext
- Meridian Works
- industrytext
- Software
- company_sizetext
- 11-50
- countrytext
- United States
- acquisition_channeltext
- organic
- created_atdate & time
- 2024-01-23 23:42:36
- account_idnumber · unique id
- 5
- account_nametext
- Prism Health Group
- industrytext
- Software
- company_sizetext
- 1-10
- countrytext
- Germany
- acquisition_channeltext
- referral
- created_atdate & time
- 2024-01-25 11:43:43
- account_idnumber · unique id
- 6
- account_nametext
- Beacon Supply Ltd
- industrytext
- Media
- company_sizetext
- 1000+
- countrytext
- United Kingdom
- acquisition_channeltext
- organic
- created_atdate & time
- 2024-01-27 20:19:28
first 6 of 3,200 rows · your queries use all of them
Hints and the answer are always available. Using them counts the question as solved with help.