Skip to main content
Use the same query standards from the SQL Query Library overview: is_order_sm_valid = TRUE for order analyses, sm_store_id scoping for multi-store setups, and your_project placeholders.
What you’ll learn: Which marketing channels drive higher-value orders. Channels with high AOV may warrant more budget even if volume is lower. Low-AOV channels might need different offer strategies.
What you’ll learn: How much of your recent revenue comes from customers with subscription history (even if they’re not currently subscribed). Helps quantify the long-term value of your subscription program.
What you’ll learn: Which marketing channels have higher refund rates, by order count and by revenue. High refund rates may indicate mismatched expectations from certain ad campaigns or audiences. Both rates cover valid orders only. A fully refunded order is not a valid order, so it is in neither the refunded count nor the order total. The rates reflect partial refunds and understate your full refund rate. The revenue rate divides product refunds by product revenue before refunds and leaves out shipping refunds.
What you’ll learn: How your orders and revenue are distributed across different sales channels (online, POS, wholesale, etc.). Useful for understanding channel mix and identifying growth opportunities.

What you’ll learn: The share of valid, non-cancelled Shopify orders that had a return, by month of the order, for the last 24 months. Needs return data from Loop Returns, ReturnGO, or Shopify returns. Joins fct_returns to obt_orders, so the returned orders and the order total come from the same set of valid orders.
What you’ll learn: Which marketing channels drive the highest return costs. Helps identify whether certain acquisition channels attract customers with higher return propensity. Needs return data from Loop Returns or ReturnGO. Shopify returns carry no cost amounts, so the query leaves them out.
What you’ll learn: How customers resolve returns: refund, exchange, store credit, or upsell. Exchange-heavy return programs retain more revenue than refund-heavy ones. Needs return data from Loop Returns, ReturnGO, or Shopify returns. Shopify returns record only whether there was an exchange, so a Shopify return without one counts as other.
What you’ll learn: Which products appear most often on orders that later had a return. This is an order-level exposure view, not returned-item attribution. Use it to find products worth deeper returns review.
Back to the SQL Query Library.

Products

Break down order and revenue trends by product mix.

Customers & Retention

Segment order outcomes by first-time vs repeat behavior.

Marketing & Ads

Compare channel investment to realized revenue outcomes.