Real examples showing how teams use AskLytix to unlock insights and drive business value.
Sales Trend Analysis
Example Question:
"Show me monthly sales trends for the last 12 months"
AI-Generated Insights:
Business Benefits:
Generated SQL:
SELECT MONTH(order_date) as month, SUM(amount) as total_sales, COUNT(DISTINCT customer_id) as unique_customers FROM orders WHERE order_date >= DATE_SUB(CURDATE(), INTERVAL 12 MONTH) GROUP BY MONTH(order_date) ORDER BY month
⚡ Fast: Average 5-12s response time
Customer Segmentation
Example Question:
"Segment customers by purchase frequency and value"
AI-Generated Insights:
Business Benefits:
Generated SQL:
SELECT
CASE
WHEN total_purchases >= 10 THEN 'VIP'
WHEN total_purchases >= 5 THEN 'Regular'
ELSE 'Occasional'
END as segment,
COUNT(*) as customer_count,
AVG(lifetime_value) as avg_ltv
FROM customer_stats
GROUP BY segment⚡ Fast: Average 5-12s response time
Inventory Optimization
Example Question:
"Which products are understocked or overstocked?"
AI-Generated Insights:
Business Benefits:
Generated SQL:
SELECT
product_name,
current_stock,
avg_daily_sales * 30 as monthly_forecast,
CASE
WHEN current_stock < avg_daily_sales * 7 THEN 'Understock'
WHEN current_stock > avg_daily_sales * 60 THEN 'Overstock'
ELSE 'Optimal'
END as stock_status
FROM inventory_analysis⚡ Fast: Average 5-12s response time
Revenue Forecasting
Example Question:
"Forecast next quarter revenue based on trends"
AI-Generated Insights:
Business Benefits:
Generated SQL:
WITH monthly_revenue AS (
SELECT
DATE_TRUNC('month', order_date) as month,
SUM(amount) as revenue
FROM orders
WHERE order_date >= DATE_SUB(CURDATE(), INTERVAL 12 MONTH)
GROUP BY month
)
SELECT
month,
revenue,
AVG(revenue) OVER (ORDER BY month ROWS 3 PRECEDING) as moving_avg
FROM monthly_revenue⚡ Fast: Average 5-12s response time
Campaign Performance
Example Question:
"Compare ROI across marketing campaigns"
AI-Generated Insights:
Business Benefits:
Generated SQL:
SELECT campaign_name, SUM(spend) as total_spend, SUM(revenue) as total_revenue, (SUM(revenue) - SUM(spend)) / SUM(spend) * 100 as roi_percent, COUNT(DISTINCT customer_id) as customers_acquired FROM marketing_performance GROUP BY campaign_name ORDER BY roi_percent DESC
⚡ Fast: Average 5-12s response time
Churn Prediction
Example Question:
"Which customers are at risk of churning?"
AI-Generated Insights:
Business Benefits:
Generated SQL:
SELECT
customer_id,
customer_name,
days_since_last_order,
lifetime_value,
CASE
WHEN days_since_last_order > 90 THEN 'High Risk'
WHEN days_since_last_order > 60 THEN 'Medium Risk'
ELSE 'Low Risk'
END as churn_risk
FROM customer_engagement
WHERE churn_risk IN ('High Risk', 'Medium Risk')
ORDER BY lifetime_value DESC⚡ Fast: Average 5-12s response time