HomeQuery LibraryAmazon

What is your actual net margin per Amazon SKU after all fees?

Revenue is vanity, net is reality. This query combines order revenue, FBA fulfillment fees, referral fees, and returns to show what you're actually keeping on each product.

📊 Amazon Seller Central👥 Amazon FBA sellers🔤 Plain-English → SQL
Part of the Explore all Amazon analytics queries

This is part of the Taptic Data Amazon query library. Explore related queries: SQL query for Amazon return rate by SKU, SQL query for Amazon net margin after FBA fees, SQL query for Amazon buy box percentage by ASIN, and more.

Show me net margin per SKU after FBA fees, referral fees, and returns for the last 90 days
Amazon Net Margin by SKU — generated by Taptic Data AI
WITH revenue AS (
  SELECT
    i.sku,
    MAX(i.product_name)              AS product_name,
    SUM(i.item_price * i.quantity)   AS gross_revenue,
    SUM(i.quantity)                  AS units_sold
  FROM amazon_order_items i
  JOIN amazon_orders o ON o.amazon_order_id = i.amazon_order_id
  WHERE o.order_status NOT IN ('Canceled', 'Cancelled')
    AND i.item_price IS NOT NULL
    AND o.purchase_date::date >= CURRENT_DATE - INTERVAL '90 days'
  GROUP BY i.sku
),
fees AS (
  SELECT
    seller_sku                        AS sku,
    SUM(item_related_fee_amount)      AS total_fees
  FROM amazon_financial_events
  WHERE charge_type IN ('FBAPerUnitFulfillmentFee', 'Commission')
    AND posted_date::date >= CURRENT_DATE - INTERVAL '90 days'
  GROUP BY seller_sku
),
returns_cost AS (
  SELECT
    sku,
    COUNT(*) * AVG(f.estimated_referral_fee_per_unit) AS estimated_return_cost
  FROM amazon_returns r
  JOIN amazon_fba_fees f USING (sku)
  WHERE r.return_date::date >= CURRENT_DATE - INTERVAL '90 days'
  GROUP BY r.sku
)
SELECT
  r.sku,
  r.product_name,
  r.gross_revenue,
  COALESCE(f.total_fees, 0)          AS total_fees,
  COALESCE(rc.estimated_return_cost, 0) AS estimated_return_cost,
  r.gross_revenue
    - COALESCE(f.total_fees, 0)
    - COALESCE(rc.estimated_return_cost, 0) AS estimated_net,
  ROUND(
    (r.gross_revenue
      - COALESCE(f.total_fees, 0)
      - COALESCE(rc.estimated_return_cost, 0))
    / NULLIF(r.gross_revenue, 0) * 100, 2
  )                                   AS net_margin_pct
FROM revenue r
LEFT JOIN fees f USING (sku)
LEFT JOIN returns_cost rc USING (sku)
WHERE r.units_sold > 5
ORDER BY estimated_net DESC
Schema-aware SQL generated from plain English51 lines

This query was generated by Taptic Data from plain English against a real Amazon Seller Central schema. In Taptic, you type the question — the AI writes the SQL, runs it, and returns the result. You can edit the SQL, ask for explanations, and save it as a refreshable report. This type of analysis is commonly used in amazon fba analytics and settlement reconciliation.

Breaking it down line by line

  1. CTE "revenue" sums gross revenue and units per SKU from order_items, filtered to non-cancelled orders
  2. CTE "fees" pulls FBA fulfillment fees and referral commissions from financial_events for the same period
  3. CTE "returns_cost" estimates the cost of returns using the FBA fees table's referral fee estimate
  4. The final SELECT subtracts fees and return costs from gross revenue to produce estimated net per SKU
  5. Net margin percentage is calculated as net / gross * 100, with NULLIF protecting against division by zero

Result description

A ranked table showing each SKU's gross revenue, total fees, estimated return costs, estimated net revenue, and net margin percentage — sorted by highest absolute net to find your most profitable products.

The business impact

Most Amazon sellers know their revenue. Very few know their actual net after referral fees, FBA fulfillment fees, storage fees, and return processing costs. A product doing $50K in revenue at 8% net is dramatically less valuable than a product doing $20K at 35% net. This query makes that visible instantly.

New to this metric? How to calculate Amazon net margin after FBA fees — definition, formula, and business context.

All queries and use cases on this page relate to analyzing your Amazon Seller Central data in Taptic. To see the full analytics workflow, explore amazon fba analytics, settlement reconciliation, multi-channel analytics.

Common questions

How do I generate a "Amazon Net Margin by SKU" query automatically?
In Taptic Data, type "Show me net margin per SKU after FBA fees, referral fees, and returns for the last 90 days" and the AI generates schema-aware SQL against your real Amazon Seller Central data — no manual writing required.
What database does this query work with?
This query is designed for Amazon Seller Central. Taptic reads your live schema so the generated SQL always matches your actual table and column names.
Can I edit the generated SQL?
Yes. Taptic shows you the exact SQL it generated. You can edit it directly, ask the AI to explain any line, or request a revision in plain English.
Can I save this as a scheduled report?
Yes. Once you run this query in Taptic, you can save it as a report, add charts and KPIs, and schedule it to email your team on any cadence — daily, weekly, or monthly.

Skip the SQL. Ask the question.

In Taptic Data, you type "Show me net margin per SKU after FBA fees, referral fees, an..." and this SQL runs automatically against your real Amazon Seller Central data.

Try Taptic Free — $29.99/mo

No credit card required. Connect your data source in under 5 minutes.

Next step
Run this query on your own Amazon Seller Central data
Connect 🛒 Amazon Seller Central to Taptic Data and this SQL generates automatically from plain English — against your real schema, your real tables.
Analytics hub
More Amazon queries, use cases, and analytics resources in one place.
Explore all Amazon analytics queries