Loading…
A commerce team needs monthly net sales for completed orders using ecommerce_orders and ecommerce_refunds. Net sales equals gross_amount minus discount_amount minus every refund linked to the order, including refunds processed in a later month. Aggregate refunds before joining so orders with multiple refunds are not duplicated.
Return exactly two columns: month in YYYY-MM format and net_sales rounded to 2 decimals. Return one row per order month, ordered by month.
Create a free account to save your progress and reveal the worked answer for this free exercise. The complete practice library is available with Practice Pass or Mastery.