Skip to content
SQLMediumofficialBenchmark eligiblefree

Broken revenue grain

Finance GMV is inflated because refunds and replacement line items share order_id. Rebuild the grain: one row per UTC day, net of refunds, tax excluded. Column names of finance_daily_revenue must stay stable.

FieldDetail
CreatorPipelineArena · expert
Version2.0.0
Time45 min
Credits3
Completion0% · 0.0 rating
Hidden tests5

Objective

finance_daily_revenue matches the hidden 90-day target.

#Success condition
1One row per UTC calendar day in range
2Refunds reduce net revenue
3Tax excluded
4Column names unchanged for downstream BI
#Visible instruction
1Read the current view and the grain of orders / items / refunds.
2Net replacements and refunds at the documented grain.
3CREATE OR REPLACE VIEW (or table) with the same columns.
Hidden tests score the final tables or files, not the exact syntax you used. Test implementation is never shown to participants.

Signed-in workspace: Open in app