Omnichannel Retail Analytics Path · Mission 7 of 25Medium

BOPIS completion rate by month

Conditional aggregation: SUM(CASE WHEN ... THEN 1 ELSE 0 END). Ratio with NULLIF to guard against /0. The BOPIS scorecard metric every program manager owns.

Back to Omnichannel Retail Analytics

The Brief

Priya ShahBOPIS Program Managerbopis-ops

Monthly QBR. Pull the BOPIS completion rate (pickups completed / total pickup attempts) bucketed monthly for Oct 2025 → Mar 2026. Four columns: month, total_pickups, completed_pickups, completion_pct. ROUND completion_pct to 2 decimals. Order by month ASC. Use no_show_flag = 0 as the 'completed' definition — that's what the dashboard team standardized on last quarter.

You'll practice

FunnelRatioNULLIF

Tables & columns available

fact_pickupsfact5 columns
ColumnTypeKey
pickup_idINTPK
order_idINTFK → fact_orders
pickup_tsTEXT
pickup_window_minutesINT
no_show_flagINT

Hints (4)

Each hint you reveal reduces the XP you can earn. Try the query first.

Hint 1

Filter pickup_ts >= '2025-10-01' AND pickup_ts < '2026-04-01'.

Hint 2

Conditional aggregation: SUM(CASE WHEN no_show_flag = 0 THEN 1 ELSE 0 END) AS completed_pickups.

Hint 3

completion_pct = 100.0 * completed / NULLIF(total, 0), rounded to 2 decimals.

Hint 4

DATE_TRUNC to monthly buckets, GROUP BY month, ORDER BY month ASC.