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.
A free account records your attempt and then reveals the reference answer and the explanation for every exercise in the library.