WorkWyz
Dashboard
Communications
6
My Tasks
5
Resources
Tools
Progress
Help
Settings
VP
Viplav
Revenue Analyst
Toggle Sidebar
Active Mission
Revenue Discrepancy Investigation
Active
Take tour
Time Remaining
2h 24m left
VP
Viplav
Revenue Analyst
Tools
SQL Workbench
revenue-discrepancy · sandbox
Save
Run
Connected · readonly
Explain query
-- Top regions by revenue, last 30 days SELECT c.region, COUNT(DISTINCT o.order_id) AS orders, ROUND(SUM(o.total_amount),2) AS revenue, ROUND(AVG(o.total_amount),2) AS avg_order_value FROM orders o JOIN customers c USING (customer_id) WHERE o.order_date >= CURRENT_DATE - INTERVAL '30 days' AND o.status = 'completed' GROUP BY c.region ORDER BY revenue DESC LIMIT 10;
Results
Messages
Query plan
History
5 rows
·
142 ms
Export CSV
region
orders
revenue
avg_order_value
North America
12,480
1,842,310.55
147.62
EMEA
9,120
1,233,408.12
135.24
APAC
6,840
912,001.4
133.33
LATAM
3,210
388,762.81
121.11
MEA
1,180
142,309.04
120.6
Ask the WorkWyz Guide