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.
| Field | Detail |
|---|---|
| Creator | PipelineArena · expert |
| Version | 2.0.0 |
| Time | 45 min |
| Credits | 3 |
| Completion | 0% · 0.0 rating |
| Hidden tests | 5 |
Objective
finance_daily_revenue matches the hidden 90-day target.
| # | Success condition |
|---|---|
| 1 | One row per UTC calendar day in range |
| 2 | Refunds reduce net revenue |
| 3 | Tax excluded |
| 4 | Column names unchanged for downstream BI |
| # | Visible instruction |
|---|---|
| 1 | Read the current view and the grain of orders / items / refunds. |
| 2 | Net replacements and refunds at the documented grain. |
| 3 | CREATE 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