Multi-channel sellers need to see Amazon and Shopify revenue side by side. This query combines both sources into a single monthly trend, with channel breakdown included.
The question
The SQL Taptic generates
WITH amazon_revenue AS ( SELECT DATE_TRUNC('month', o.purchase_date::timestamptz)::date AS month, 'Amazon' AS channel, ROUND(SUM(i.item_price * i.quantity), 2) AS revenue FROM amazon_orders o JOIN amazon_order_items i ON i.amazon_order_id = o.amazon_order_id WHERE o.purchase_date::date >= NOW() - INTERVAL '12 months' AND o.order_status NOT IN ('Canceled', 'Cancelled') GROUP BY 1 ), shopify_revenue AS ( SELECT DATE_TRUNC('month', created_at::timestamptz)::date AS month, 'Shopify' AS channel, ROUND(SUM(total_price::numeric), 2) AS revenue FROM shopify_orders WHERE is_test_order = false AND cancelled_at IS NULL AND financial_status NOT IN ('voided','refunded') AND created_at::date >= NOW() - INTERVAL '12 months' GROUP BY 1 ), combined AS ( SELECT * FROM amazon_revenue UNION ALL SELECT * FROM shopify_revenue ) SELECT TO_CHAR(month, 'YYYY-MM') AS order_month, channel, revenue, SUM(revenue) OVER (PARTITION BY month) AS total_revenue_all_channels FROM combined ORDER BY month ASC, channel
This query was generated by Taptic Data from plain English against a real Amazon Seller Central + Shopify 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 multi-channel analytics and ecommerce reporting.
How this query works
What it returns
Monthly revenue table with one row per channel per month, plus total combined revenue for the month — 24 rows for 12 months across 2 channels.
Why it matters
All queries and use cases on this page relate to analyzing your Amazon Seller Central + Shopify data in Taptic. To see the full analytics workflow, explore multi-channel analytics, ecommerce reporting.
FAQ
Generate this automatically
In Taptic Data, you type "Show me total revenue by month by channel for Amazon and Sho..." and this SQL runs automatically against your real Amazon Seller Central + Shopify data.
Try Taptic Free — $29.99/moNo credit card required. Connect your data source in under 5 minutes.
Related use cases