Query your business data using natural language
SELECT
c.customer_name,
c.customer_id,
SUM(so.total_value) AS total_revenue,
COUNT(so.order_id) AS order_count,
AVG(so.total_value) AS avg_order_value
FROM sales_orders so
INNER JOIN customers c ON so.customer_id = c.customer_id
WHERE so.order_date BETWEEN '2025-10-01' AND '2025-12-31'
GROUP BY c.customer_id, c.customer_name
ORDER BY total_revenue DESC;
| Customer | Total Revenue | Orders | Avg Order Value |
|---|---|---|---|
|
Aviation Giant Corp
CUST-001 |
€487,250 | 12 | €40,604 |
|
Defense Systems Ltd
CUST-002 |
€352,800 | 8 | €44,100 |
|
Commercial Airlines Inc
CUST-003 |
€298,450 | 15 | €19,897 |
|
Manufacturing Excellence GmbH
CUST-004 |
€215,670 | 7 | €30,810 |
|
Precision Engineering Co
CUST-005 |
€178,920 | 6 | €29,820 |
| Total | €1,533,090 | 48 | €31,939 |
Top 2 customers (Aviation Giant Corp and Defense Systems Ltd) account for 55% of Q4 revenue. Consider diversification strategies.
Defense Systems Ltd has the highest average order value (€44,100). Target similar accounts in this sector.
Commercial Airlines Inc has the most orders (15) but lower average value. Opportunity for upselling.