Queries · q382 · Head of B2B Commerce · week 2, night 1
“For deals that eventually get lost, does sales activity cluster early, stay steady throughout, or come in a late flurry right before the deal is given up on — or does it go quiet before the end (stalled and forgotten)?”
Fictional people at a fictional company, each played by a language-model agent. Who they are and what they are told
Week 1; shared with Samuel Whitcombe, Head of Merchant Success
B2B merchants say their sales teams struggle. How do their pipelines convert from lead to won deal, how long does it take, and what predicts winning or losing?
The manager, at the start of week 2
Note to Daniel Kim — reactions and next focus
Daniel, this is a strong memo — a few things surprised me and changed what I want to chase next.
What surprised me / needs explaining:
Questions for this week:
I know the instrumentation gaps (no stage history, no merchant-side payment terms) aren't fixable by you this week — flag both to product as you planned, that's the right move. Let's prioritize Q1 and Q3 above everything else; Q2 and Q4 can slip if slots run short.
Thanks, Daniel — good detective work this week.
Patrick
The analyst · week 2, night 1, request 1 of 3
Patrick wants Q1 (shape of activity on lost deals) and Q3 (Youssef Meijer deep-dive) prioritized, with Q2 (is zero open pipeline a constant or recent change) and Q4 (seasonality of when deals die) able to slip. I'm using all 3 slots tonight on Q1, Q3, and Q2 since Q2 is a cheap, decisive check (one grouped query against a 36-month calendar spine) that directly answers whether 'no open pipeline' is a real 3-year pattern or a recent artifact — worth confirming before Patrick takes it to Samuel. Q4 (quarter/seasonal timing of when lost deals die) is the one I'm holding back this week since it's explicitly lower priority and I'd rather see tonight's three answers first — if Q1's activity-timing report shows a seasonal clustering on its own, that might already partially answer Q4 for free. The Youssef Meijer report deliberately keeps scope to his own New-business opportunities only, matching how we found him (via last week's corrected rep-level report), and converts to EUR using the same formula we fixed last week to avoid repeating the earlier NULL bug.
The engineer · 1 dry run on the empty schema, then the submission
WITH scoped_tenants AS ( SELECT id, name FROM tenants WHERE name IN ('Ballycorran Industrial Supply','Castell Fasteners','Hanse Industriebedarf','Midland Safety Wear','Polder Packaging') ), new_business_pipelines AS ( SELECT p.id AS pipeline_id, p.tenant_id FROM pipelines p JOIN scoped_tenants st ON st.id = p.tenant_id WHERE p.name = 'New business' ), lost_opps AS ( SELECT o.id AS opportunity_id, o.tenant_id, o.created_at, o.closed_at FROM opportunities o JOIN new_business_pipelines nbp ON nbp.pipeline_id = o.pipeline_id AND nbp.tenant_id = o.tenant_id WHERE o.is_closed = true AND o.is_won = false ), total_lost AS ( SELECT COUNT(*) AS total_lost_opps FROM lost_opps ), activity_positions AS ( SELECT a.id AS activity_id, lo.opportunity_id, CASE WHEN lo.closed_at IS NULL OR lo.created_at IS NULL THEN NULL WHEN lo.closed_at = lo.created_at THEN NULL ELSE EXTRACT(EPOCH FROM (a.occurred_at - lo.created_at)) / EXTRACT(EPOCH FROM (lo.closed_at - lo.created_at)) END AS relative_position FROM activities a JOIN lost_opps lo ON lo.opportunity_id = a.opportunity_id AND a.tenant_id = lo.tenant_id ), bucketed AS ( SELECT activity_id, opportunity_id, CASE WHEN relative_position IS NULL OR relative_position < 0 OR relative_position > 1 THEN 'outside window' WHEN relative_position < 0.25 THEN 'Q1 (0-25%)' WHEN relative_position < 0.5 THEN 'Q2 (25-50%)' WHEN relative_position < 0.75 THEN 'Q3 (50-75%)' ELSE 'Q4 (75-100%)' END AS lifecycle_quartile FROM activity_positions ), totals AS ( SELECT COUNT(*) AS total_activities_all FROM bucketed ) SELECT b.lifecycle_quartile, COUNT(*) AS total_activities_in_bucket, ROUND(100.0 * COUNT(*) / t.total_activities_all, 2) AS pct_of_total_activities, COUNT(DISTINCT b.opportunity_id) AS opportunities_with_at_least_one_activity_in_bucket, ROUND(100.0 * COUNT(DISTINCT b.opportunity_id) / tl.total_lost_opps, 2) AS pct_of_lost_opportunities_with_activity_in_bucket FROM bucketed b CROSS JOIN totals t CROSS JOIN total_lost tl GROUP BY b.lifecycle_quartile, t.total_activities_all, tl.total_lost_opps ORDER BY CASE b.lifecycle_quartile WHEN 'Q1 (0-25%)' THEN 1 WHEN 'Q2 (25-50%)' THEN 2 WHEN 'Q3 (50-75%)' THEN 3 WHEN 'Q4 (75-100%)' THEN 4 ELSE 5 END
“Query compiles cleanly with the expected columns. Submitting.”
“Submitted. The query buckets each lost opportunity's activities into lifecycle quartiles (Q1–Q4) based on their relative position within the deal's own created_at→closed_at window, with an "outside window" catch-all for anomalies (post-close timestamps or zero-duration deals), and reports both activity-share and opportunity-coverage percentages per bucket using a fixed denominator for the latter.”
As Daniel Kim saw it, from the small dataset the agents worked on
lifecycle_quartile | total_activities_in_bucket | pct_of_total_activities | opportunities_with_at_least_one_activity | pct_of_lost_opportunities_with_activity_ -------------------+----------------------------+-------------------------+------------------------------------------+----------------------------------------- Q1 (0-25%) | 12 | 11.88 | 12 | 40.0 Q2 (25-50%) | 31 | 30.69 | 30 | 100.0 Q3 (50-75%) | 35 | 34.65 | 29 | 96.67 Q4 (75-100%) | 23 | 22.77 | 23 | 76.67 (4 rows)
The memo and the queries that followed; links found by title, so inferred
It builds on:
Changed only where the benchmark needs the same result on every system
WITH scoped_tenants AS ( SELECT id, name FROM tenants WHERE name IN ('Ballycorran Industrial Supply','Castell Fasteners','Hanse Industriebedarf','Midland Safety Wear','Polder Packaging')),new_business_pipelines AS ( SELECT p.id AS pipeline_id, p.tenant_id SELECT p.id AS pipeline_id, p.tenant_id AS tenant_id FROM pipelines p JOIN scoped_tenants st ON st.id = p.tenant_id WHERE p.name = 'New business'),lost_opps AS ( SELECT o.id AS opportunity_id, o.tenant_id, o.created_at, o.closed_at SELECT o.id AS opportunity_id, o.tenant_id AS tenant_id, o.created_at AS created_at, o.closed_at AS closed_at FROM opportunities o JOIN new_business_pipelines nbp ON nbp.pipeline_id = o.pipeline_id AND nbp.tenant_id = o.tenant_id WHERE o.is_closed = true AND o.is_won = false),total_lost AS ( SELECT COUNT(*) AS total_lost_opps FROM lost_opps),activity_positions AS ( SELECT a.id AS activity_id, lo.opportunity_id, lo.opportunity_id AS opportunity_id, CASE WHEN lo.closed_at IS NULL OR lo.created_at IS NULL THEN NULL WHEN lo.closed_at = lo.created_at THEN NULL ELSE EXTRACT(EPOCH FROM (a.occurred_at - lo.created_at)) / EXTRACT(EPOCH FROM (lo.closed_at - lo.created_at)) END AS relative_position ELSE {{seconds_between(lo.created_at, lo.closed_at)}} END AS lifetime_seconds, {{seconds_between(lo.created_at, a.occurred_at)}} AS elapsed_seconds FROM activities a JOIN lost_opps lo ON lo.opportunity_id = a.opportunity_id AND a.tenant_id = lo.tenant_id),bucketed AS ( SELECT activity_id, opportunity_id, CASE WHEN relative_position IS NULL OR relative_position < 0 OR relative_position > 1 THEN 'outside window' WHEN relative_position < 0.25 THEN 'Q1 (0-25%)' WHEN relative_position < 0.5 THEN 'Q2 (25-50%)' WHEN relative_position < 0.75 THEN 'Q3 (50-75%)' WHEN lifetime_seconds IS NULL OR elapsed_seconds IS NULL OR elapsed_seconds < 0 OR elapsed_seconds > lifetime_seconds THEN 'outside window' WHEN 4 * elapsed_seconds < lifetime_seconds THEN 'Q1 (0-25%)' WHEN 2 * elapsed_seconds < lifetime_seconds THEN 'Q2 (25-50%)' WHEN 4 * elapsed_seconds < 3 * lifetime_seconds THEN 'Q3 (50-75%)' ELSE 'Q4 (75-100%)' END AS lifecycle_quartile FROM activity_positions),totals AS ( SELECT COUNT(*) AS total_activities_all FROM bucketed)SELECT b.lifecycle_quartile, b.lifecycle_quartile AS lifecycle_quartile, COUNT(*) AS total_activities_in_bucket, ROUND(100.0 * COUNT(*) / t.total_activities_all, 2) AS pct_of_total_activities, 100.0 * COUNT(*) / t.total_activities_all AS pct_of_total_activities, COUNT(DISTINCT b.opportunity_id) AS opportunities_with_at_least_one_activity_in_bucket, ROUND(100.0 * COUNT(DISTINCT b.opportunity_id) / tl.total_lost_opps, 2) AS pct_of_lost_opportunities_with_activity_in_bucket 100.0 * COUNT(DISTINCT b.opportunity_id) / tl.total_lost_opps AS pct_of_lost_opportunities_with_activity_in_bucketFROM bucketed bCROSS JOIN totals tCROSS JOIN total_lost tlGROUP BY b.lifecycle_quartile, t.total_activities_all, tl.total_lost_oppsORDER BY CASE b.lifecycle_quartile WHEN 'Q1 (0-25%)' THEN 1 WHEN 'Q2 (25-50%)' THEN 2 WHEN 'Q3 (50-75%)' THEN 3 WHEN 'Q4 (75-100%)' THEN 4 ELSE 5ENDEND NULLS LAST
WITH scoped_tenants AS ( SELECT id, name FROM tenants WHERE name IN ('Ballycorran Industrial Supply','Castell Fasteners','Hanse Industriebedarf','Midland Safety Wear','Polder Packaging') ), new_business_pipelines AS ( SELECT p.id AS pipeline_id, p.tenant_id AS tenant_id FROM pipelines p JOIN scoped_tenants st ON st.id = p.tenant_id WHERE p.name = 'New business' ), lost_opps AS ( SELECT o.id AS opportunity_id, o.tenant_id AS tenant_id, o.created_at AS created_at, o.closed_at AS closed_at FROM opportunities o JOIN new_business_pipelines nbp ON nbp.pipeline_id = o.pipeline_id AND nbp.tenant_id = o.tenant_id WHERE o.is_closed = true AND o.is_won = false ), total_lost AS ( SELECT COUNT(*) AS total_lost_opps FROM lost_opps ), activity_positions AS ( SELECT a.id AS activity_id, lo.opportunity_id AS opportunity_id, CASE WHEN lo.closed_at IS NULL OR lo.created_at IS NULL THEN NULL WHEN lo.closed_at = lo.created_at THEN NULL ELSE CAST(EXTRACT(EPOCH FROM (lo.closed_at - lo.created_at)) AS NUMERIC(18,6)) END AS lifetime_seconds, CAST(EXTRACT(EPOCH FROM (a.occurred_at - lo.created_at)) AS NUMERIC(18,6)) AS elapsed_seconds FROM activities a JOIN lost_opps lo ON lo.opportunity_id = a.opportunity_id AND a.tenant_id = lo.tenant_id ), bucketed AS ( SELECT activity_id, opportunity_id, CASE WHEN lifetime_seconds IS NULL OR elapsed_seconds IS NULL OR elapsed_seconds < 0 OR elapsed_seconds > lifetime_seconds THEN 'outside window' WHEN 4 * elapsed_seconds < lifetime_seconds THEN 'Q1 (0-25%)' WHEN 2 * elapsed_seconds < lifetime_seconds THEN 'Q2 (25-50%)' WHEN 4 * elapsed_seconds < 3 * lifetime_seconds THEN 'Q3 (50-75%)' ELSE 'Q4 (75-100%)' END AS lifecycle_quartile FROM activity_positions ), totals AS ( SELECT COUNT(*) AS total_activities_all FROM bucketed ) SELECT b.lifecycle_quartile AS lifecycle_quartile, COUNT(*) AS total_activities_in_bucket, 100.0 * COUNT(*) / t.total_activities_all AS pct_of_total_activities, COUNT(DISTINCT b.opportunity_id) AS opportunities_with_at_least_one_activity_in_bucket, 100.0 * COUNT(DISTINCT b.opportunity_id) / tl.total_lost_opps AS pct_of_lost_opportunities_with_activity_in_bucket FROM bucketed b CROSS JOIN totals t CROSS JOIN total_lost tl GROUP BY b.lifecycle_quartile, t.total_activities_all, tl.total_lost_opps ORDER BY CASE b.lifecycle_quartile WHEN 'Q1 (0-25%)' THEN 1 WHEN 'Q2 (25-50%)' THEN 2 WHEN 'Q3 (50-75%)' THEN 3 WHEN 'Q4 (75-100%)' THEN 4 ELSE 5 END NULLS LAST
WITH scoped_tenants AS ( SELECT id, name FROM tenants WHERE name IN ('Ballycorran Industrial Supply','Castell Fasteners','Hanse Industriebedarf','Midland Safety Wear','Polder Packaging') ), new_business_pipelines AS ( SELECT p.id AS pipeline_id, p.tenant_id AS tenant_id FROM pipelines p JOIN scoped_tenants st ON st.id = p.tenant_id WHERE p.name = 'New business' ), lost_opps AS ( SELECT o.id AS opportunity_id, o.tenant_id AS tenant_id, o.created_at AS created_at, o.closed_at AS closed_at FROM opportunities o JOIN new_business_pipelines nbp ON nbp.pipeline_id = o.pipeline_id AND nbp.tenant_id = o.tenant_id WHERE o.is_closed = true AND o.is_won = false ), total_lost AS ( SELECT COUNT(*) AS total_lost_opps FROM lost_opps ), activity_positions AS ( SELECT a.id AS activity_id, lo.opportunity_id AS opportunity_id, CASE WHEN lo.closed_at IS NULL OR lo.created_at IS NULL THEN NULL WHEN lo.closed_at = lo.created_at THEN NULL ELSE CAST(divideDecimal(toDecimal128(dateDiff('microsecond', lo.created_at, lo.closed_at), 0), toDecimal128(1000000, 0), 6) AS Nullable(Decimal(18, 6))) END AS lifetime_seconds, CAST(divideDecimal(toDecimal128(dateDiff('microsecond', lo.created_at, a.occurred_at), 0), toDecimal128(1000000, 0), 6) AS Nullable(Decimal(18, 6))) AS elapsed_seconds FROM activities a JOIN lost_opps lo ON lo.opportunity_id = a.opportunity_id AND a.tenant_id = lo.tenant_id ), bucketed AS ( SELECT activity_id, opportunity_id, CASE WHEN lifetime_seconds IS NULL OR elapsed_seconds IS NULL OR elapsed_seconds < 0 OR elapsed_seconds > lifetime_seconds THEN 'outside window' WHEN 4 * elapsed_seconds < lifetime_seconds THEN 'Q1 (0-25%)' WHEN 2 * elapsed_seconds < lifetime_seconds THEN 'Q2 (25-50%)' WHEN 4 * elapsed_seconds < 3 * lifetime_seconds THEN 'Q3 (50-75%)' ELSE 'Q4 (75-100%)' END AS lifecycle_quartile FROM activity_positions ), totals AS ( SELECT COUNT(*) AS total_activities_all FROM bucketed ) SELECT b.lifecycle_quartile AS lifecycle_quartile, COUNT(*) AS total_activities_in_bucket, 100.0 * COUNT(*) / t.total_activities_all AS pct_of_total_activities, COUNT(DISTINCT b.opportunity_id) AS opportunities_with_at_least_one_activity_in_bucket, 100.0 * COUNT(DISTINCT b.opportunity_id) / tl.total_lost_opps AS pct_of_lost_opportunities_with_activity_in_bucket FROM bucketed b CROSS JOIN totals t CROSS JOIN total_lost tl GROUP BY b.lifecycle_quartile, t.total_activities_all, tl.total_lost_opps ORDER BY CASE b.lifecycle_quartile WHEN 'Q1 (0-25%)' THEN 1 WHEN 'Q2 (25-50%)' THEN 2 WHEN 'Q3 (50-75%)' THEN 3 WHEN 'Q4 (75-100%)' THEN 4 ELSE 5 END NULLS LAST
The agents' own records, as the role play wrote them; only the personal data of the person who ran it is redacted
Report request from Daniel Kim (analyst for the Head of B2B Commerce):
Title: Lost B2B Wholesale Deals: When Does Activity Happen Relative to the Deal's Life
Question: For deals that eventually get lost, does sales activity cluster early, stay steady throughout, or come in a late flurry right before the deal is given up on — or does it go quiet before the end (stalled and forgotten)?
Grain: one row per lifecycle quartile (relative position within each lost opportunity's own created_at-to-closed_at window)
Columns:
- lifecycle_quartile (Q1 0-25%, Q2 25-50%, Q3 50-75%, Q4 75-100% of the deal's own duration)
- total_activities_in_bucket
- pct_of_total_activities
- opportunities_with_at_least_one_activity_in_bucket
- pct_of_lost_opportunities_with_activity_in_bucket
Details: Scope: tenants.name IN ('Ballycorran Industrial Supply','Castell Fasteners','Hanse Industriebedarf','Midland Safety Wear','Polder Packaging'), pipeline_id = each tenant's 'New business' pipeline, opportunities where is_closed = true and is_won = false. For each such opportunity, join activities where activities.opportunity_id = opportunity.id. For each activity compute relative_position = (activity.occurred_at - opportunity.created_at) / NULLIF(opportunity.closed_at - opportunity.created_at, 0), expressed as a fraction of the deal's own lifespan. Bucket into quartiles: Q1 [0, 0.25), Q2 [0.25, 0.5), Q3 [0.5, 0.75), Q4 [0.75, 1.0] inclusive of activities right at closed_at. If any activity falls outside [0,1] (e.g. logged after closed_at, or the opportunity has zero duration), put it in a 5th 'outside window' bucket rather than discarding it, and flag how many rows that affects. total_activities_in_bucket = count of activities in that bucket; pct_of_total_activities = that count / total activities across all lost opportunities in scope; opportunities_with_at_least_one_activity_in_bucket = distinct opportunity count; pct_of_lost_opportunities_with_activity_in_bucket = that count / total lost opportunities in scope (a fixed denominator across rows). Order Q1 through Q4, then 'outside window' last if present.
Check your query with the warehouse's dry_run tool, then hand it in with submit.dry_runWITH scoped_tenants AS ( SELECT id, name FROM tenants WHERE name IN ('Ballycorran Industrial Supply','Castell Fasteners','Hanse Industriebedarf','Midland Safety Wear','Polder Packaging') ), new_business_pipelines AS ( SELECT p.id AS pipeline_id, p.tenant_id FROM pipelines p JOIN scoped_tenants st ON st.id = p.tenant_id WHERE p.name = 'New business' ), lost_opps AS ( SELECT o.id AS opportunity_id, o.tenant_id, o.created_at, o.closed_at FROM opportunities o JOIN new_business_pipelines nbp ON nbp.pipeline_id = o.pipeline_id AND nbp.tenant_id = o.tenant_id WHERE o.is_closed = true AND o.is_won = false ), total_lost AS ( SELECT COUNT(*) AS total_lost_opps FROM lost_opps ), activity_positions AS ( SELECT a.id AS activity_id, lo.opportunity_id, CASE WHEN lo.closed_at IS NULL OR lo.created_at IS NULL THEN NULL WHEN lo.closed_at = lo.created_at THEN NULL ELSE EXTRACT(EPOCH FROM (a.occurred_at - lo.created_at)) / EXTRACT(EPOCH FROM (lo.closed_at - lo.created_at)) END AS relative_position FROM activities a JOIN lost_opps lo ON lo.opportunity_id = a.opportunity_id AND a.tenant_id = lo.tenant_id ), bucketed AS ( SELECT activity_id, opportunity_id, CASE WHEN relative_position IS NULL OR relative_position < 0 OR relative_position > 1 THEN 'outside window' WHEN relative_position < 0.25 THEN 'Q1 (0-25%)' WHEN relative_position < 0.5 THEN 'Q2 (25-50%)' WHEN relative_position < 0.75 THEN 'Q3 (50-75%)' ELSE 'Q4 (75-100%)' END AS lifecycle_quartile FROM activity_positions ), totals AS ( SELECT COUNT(*) AS total_activities_all FROM bucketed ) SELECT b.lifecycle_quartile, COUNT(*) AS total_activities_in_bucket, ROUND(100.0 * COUNT(*) / t.total_activities_all, 2) AS pct_of_total_activities, COUNT(DISTINCT b.opportunity_id) AS opportunities_with_at_least_one_activity_in_bucket, ROUND(100.0 * COUNT(DISTINCT b.opportunity_id) / tl.total_lost_opps, 2) AS pct_of_lost_opportunities_with_activity_in_bucket FROM bucketed b CROSS JOIN totals t CROSS JOIN total_lost tl GROUP BY b.lifecycle_quartile, t.total_activities_all, tl.total_lost_opps ORDER BY CASE b.lifecycle_quartile WHEN 'Q1 (0-25%)' THEN 1 WHEN 'Q2 (25-50%)' THEN 2 WHEN 'Q3 (50-75%)' THEN 3 WHEN 'Q4 (75-100%)' THEN 4 ELSE 5 END
STATUS: COMPILES (dry run on the empty schema, no data read) COLUMNS: lifecycle_quartile, total_activities_in_bucket, pct_of_total_activities, opportunities_with_at_least_one_activity_in_bucket, pct_of_lost_opportunities_with_activity_in_bucket
submitWITH scoped_tenants AS ( SELECT id, name FROM tenants WHERE name IN ('Ballycorran Industrial Supply','Castell Fasteners','Hanse Industriebedarf','Midland Safety Wear','Polder Packaging') ), new_business_pipelines AS ( SELECT p.id AS pipeline_id, p.tenant_id FROM pipelines p JOIN scoped_tenants st ON st.id = p.tenant_id WHERE p.name = 'New business' ), lost_opps AS ( SELECT o.id AS opportunity_id, o.tenant_id, o.created_at, o.closed_at FROM opportunities o JOIN new_business_pipelines nbp ON nbp.pipeline_id = o.pipeline_id AND nbp.tenant_id = o.tenant_id WHERE o.is_closed = true AND o.is_won = false ), total_lost AS ( SELECT COUNT(*) AS total_lost_opps FROM lost_opps ), activity_positions AS ( SELECT a.id AS activity_id, lo.opportunity_id, CASE WHEN lo.closed_at IS NULL OR lo.created_at IS NULL THEN NULL WHEN lo.closed_at = lo.created_at THEN NULL ELSE EXTRACT(EPOCH FROM (a.occurred_at - lo.created_at)) / EXTRACT(EPOCH FROM (lo.closed_at - lo.created_at)) END AS relative_position FROM activities a JOIN lost_opps lo ON lo.opportunity_id = a.opportunity_id AND a.tenant_id = lo.tenant_id ), bucketed AS ( SELECT activity_id, opportunity_id, CASE WHEN relative_position IS NULL OR relative_position < 0 OR relative_position > 1 THEN 'outside window' WHEN relative_position < 0.25 THEN 'Q1 (0-25%)' WHEN relative_position < 0.5 THEN 'Q2 (25-50%)' WHEN relative_position < 0.75 THEN 'Q3 (50-75%)' ELSE 'Q4 (75-100%)' END AS lifecycle_quartile FROM activity_positions ), totals AS ( SELECT COUNT(*) AS total_activities_all FROM bucketed ) SELECT b.lifecycle_quartile, COUNT(*) AS total_activities_in_bucket, ROUND(100.0 * COUNT(*) / t.total_activities_all, 2) AS pct_of_total_activities, COUNT(DISTINCT b.opportunity_id) AS opportunities_with_at_least_one_activity_in_bucket, ROUND(100.0 * COUNT(DISTINCT b.opportunity_id) / tl.total_lost_opps, 2) AS pct_of_lost_opportunities_with_activity_in_bucket FROM bucketed b CROSS JOIN totals t CROSS JOIN total_lost tl GROUP BY b.lifecycle_quartile, t.total_activities_all, tl.total_lost_opps ORDER BY CASE b.lifecycle_quartile WHEN 'Q1 (0-25%)' THEN 1 WHEN 'Q2 (25-50%)' THEN 2 WHEN 'Q3 (50-75%)' THEN 3 WHEN 'Q4 (75-100%)' THEN 4 ELSE 5 END
Submitted to tonight's batch. Your work on this request is done.