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.
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 Shopify orders that had a return, by month. Loop Returns integration required. Joins fct_returns against obt_orders for the full order population denominator.
What you’ll learn: Which marketing channels drive the highest return costs. Helps identify whether certain acquisition channels attract customers with higher return propensity. Loop Returns integration required.
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. Loop Returns integration required.
What you’ll learn: Which products appear most often on orders that later had a Loop 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.