ASK SQLKIT
Ask in plain language…
Show top 5 customers by
Show top 5 customers by revenue last quarter
Show top 5 customers by revenue last quarter
query.sql
-- your SQL appears here
-- describe it in plain language
SELECT
c.name,
SUM(o.amount) AS revenue
FROM customers c
JOIN orders o ON o.customer_id = c.id
WHERE o.created_at >= date_trunc('quarter', now())
GROUP BY c.name
ORDER BY revenue DESC
LIMIT 5;
Run
✓ Ran in 2.4s
— 5 rows returned
Results
Generated by SqlKit Agent — 2.4s
| # | Customer | Revenue |
| 1 | Northwind Traders | $128,430 |
| 2 | Acme Corp | $94,210 |
| 3 | Globex | $71,875 |
| 4 | Initech | $58,030 |
| 5 | Umbrella Corp | $44,590 |