Transform LLMs into powerful data analysis assistants for SQL, statistics, and insights
LLMs can generate SQL queries, interpret complex datasets, describe visualizations, and perform statistical analysis. The key is providing clear context about your data structure and analysis goals.
LLMs need to understand your table structures, column names, data types, and relationships to generate accurate SQL.
You are a SQL expert. Generate a query based on the following schema:
Tables:
- customers (id, name, email, signup_date, plan_tier)
- orders (id, customer_id, order_date, total_amount, status)
- products (id, name, category, price)
- order_items (order_id, product_id, quantity, price)
Task: Find the top 10 customers by total spend in the last 6 months, showing their name, email, number of orders, and total spend. Sort by total spend descending.
Different databases have different syntax. Always specify which SQL dialect you're using.
Include in prompt:
Example:
"Generate a PostgreSQL query using CTEs for better readability..."
Raw data without context is meaningless. Help the LLM understand what the numbers represent and what's considered good or bad.
Analyze this customer churn data:
Month: Jan | Churn Rate: 3.2% | MRR Lost: $45,000
Month: Feb | Churn Rate: 4.1% | MRR Lost: $58,000
Month: Mar | Churn Rate: 5.8% | MRR Lost: $82,000
Context:
Provide insights on the trend, severity, and potential causes.
Don't just ask "what do you see?" — direct the LLM toward the types of insights you need.
❌ Vague:
"Analyze this data."
✓ Specific:
"Identify anomalies, seasonal patterns, and any metrics that deviate >20% from the 6-month average."
LLMs can recommend or describe appropriate visualizations if you explain your data and goals.
I have this dataset:
Tasks:
If you know which test you need, state it clearly. If not, describe your hypothesis and let the LLM recommend.
I ran an A/B test with these results:
Control (A): 10,000 users, 850 conversions (8.5%)
Variant (B): 10,000 users, 920 conversions (9.2%)
Tasks:
Statistical results are useless if stakeholders can't understand them. Always ask for interpretation.
Add to your prompts:
Always review generated SQL for correctness and performance before executing on production data
Include a few rows of sample data to help the LLM understand data formats and types
Explain what metrics mean in your business domain for more relevant insights
Request that the LLM explain its SQL logic or statistical reasoning
Verify statistical calculations and complex aggregations independently
LLMs don't have access to your actual database — you must provide the data
We can help you build custom AI workflows for data analysis, reporting, and visualization