Homeโ€บQuery Libraryโ€บAmazon

Are you more profitable on FBA or FBM โ€” by SKU?

Many sellers assume FBA is always better. This query compares net margin between FBA and FBM fulfillment channels at the SKU level so you can make data-driven fulfillment decisions.

๐Ÿ“Š Amazon Seller Central๐Ÿ‘ฅ Amazon multi-channel sellers๐Ÿ”ค Plain-English โ†’ SQL

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.

Compare net margin per SKU for FBA orders vs FBM orders in the last 90 days
โ†“
Amazon FBA vs FBM Margin Comparison โ€” generated by Taptic Data AI
WITH channel_revenue AS (
  SELECT
    i.sku,
    i.fulfillment_channel,
    SUM(i.item_price * i.quantity)   AS gross_revenue,
    SUM(i.quantity)                  AS units_sold,
    COUNT(DISTINCT o.amazon_order_id) AS order_count
  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, i.fulfillment_channel
),
channel_fees AS (
  SELECT
    seller_sku               AS sku,
    fulfillment_channel,
    SUM(ABS(item_related_fee_amount)) AS total_fees
  FROM amazon_financial_events
  WHERE posted_date::date >= CURRENT_DATE - INTERVAL '90 days'
    AND charge_type IN ('FBAPerUnitFulfillmentFee', 'Commission', 'ShippingChargeback')
  GROUP BY seller_sku, fulfillment_channel
)
SELECT
  cr.sku,
  cr.fulfillment_channel,
  cr.order_count,
  cr.units_sold,
  ROUND(cr.gross_revenue::numeric, 2)        AS gross_revenue,
  ROUND(COALESCE(cf.total_fees, 0)::numeric, 2) AS total_fees,
  ROUND((cr.gross_revenue - COALESCE(cf.total_fees, 0))::numeric, 2) AS estimated_net,
  ROUND(
    (cr.gross_revenue - COALESCE(cf.total_fees, 0))
    / NULLIF(cr.gross_revenue, 0) * 100, 1
  )                                           AS net_margin_pct
FROM channel_revenue cr
LEFT JOIN channel_fees cf USING (sku, fulfillment_channel)
WHERE cr.units_sold >= 5
ORDER BY cr.sku, cr.fulfillment_channel
Schema-aware SQL generated from plain English40 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.

Breaking it down line by line

  1. CTE "channel_revenue" splits gross revenue by SKU and fulfillment_channel (AFN = FBA, MFN = FBM)
  2. CTE "channel_fees" pulls fees from financial_events, also partitioned by fulfillment_channel
  3. The final SELECT subtracts fees from revenue per channel per SKU for a side-by-side comparison
  4. SKUs that sell on both channels appear in consecutive rows for easy comparison
  5. HAVING units_sold >= 5 filters out noise from low-volume SKU-channel combos

Result description

SKU-level margin comparison between FBA and FBM fulfillment channels โ€” gross revenue, fees, net revenue, and net margin percentage side by side.

The business impact

Fulfillment channel directly impacts profitability. An SKU netting 25% margin via FBM might only net 12% via FBA after fulfillment and storage fees. Conversely, FBA's buy box advantage might generate enough additional volume to make the lower margin worthwhile. You need SKU-level data to decide.

Common questions

How do I generate a "Amazon FBA vs FBM Margin Comparison" query automatically?
In Taptic Data, type "Compare net margin per SKU for FBA orders vs FBM orders in 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 "Compare net margin per SKU for FBA orders vs FBM orders in t..." 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.