Step 1-2: Generate Insights
Generate Insights
Run the 'Business Insights' analysis on your database to automatically detect domain structures and relationships.
Domain Classification
Domain: E-Commerce Platform Confidence: 94% Evidence: - Order processing workflow - Product catalog structure - Payment tables
Step 3: Catalog Detected KPIs
Revenue Metrics
Total Revenue:
SUM(total_amount) WHERE status='completed'
SUM(total_amount) WHERE status='completed'
Avg Order Value:
AVG(total_amount) by customer_segment
AVG(total_amount) by customer_segment
Customer Metrics
Churn Rate:
Customers inactive > 180 days / Total Customers
Customers inactive > 180 days / Total Customers
CLV:
Total Revenue / Distinct Customers
Total Revenue / Distinct Customers
Step 4: Map Metrics to BI Tools
Dashboard Definition
- Metric: Monthly Revenue
- Source: orders table
- Update: Daily at midnight
- Owner: Sales Analytics
SQL Query Template
SELECT
DATE_TRUNC('month', created_at) as month,
category,
SUM(total_amount) as revenue
FROM orders o
JOIN order_items oi ON o.id = oi.order_id
WHERE o.status = 'completed'
GROUP BY month, category
ORDER BY month DESC;Step 5-6: Document & Catalog
| Metric Name | Definition | Update Freq | Dashboard |
|---|---|---|---|
| Customer Churn | % inactive > 180 days | Weekly | Customer Health |
| Monthly Revenue | Sum of completed orders | Daily | Executive Overview |
| Inventory Turnover | Sold / Stock | Daily | Operations |
| Order Fulfillment | Avg time to ship | Hourly | Logistics |