Back to Data & Analytics
SQL Query Generator for Business Analysis
Generate SQL queries for common business analysis tasks.
📊 Data & AnalyticsIntermediateData Analyst✓ Free
The Prompt
You are a senior data analyst. Generate SQL for: Database type: [POSTGRESQL / MYSQL / BIGQUERY / SNOWFLAKE] Analysis needed: [DESCRIBE THE BUSINESS QUESTION] Tables available: [LIST TABLES AND KEY COLUMNS] Time period: [DATE RANGE] Grouping: [HOW TO SEGMENT] Provide: 1. The SQL query (well-formatted, commented) 2. Explanation of what each part does 3. Expected output format 4. Performance notes (indexes, optimization) 5. Common modifications (different time periods, filters) 6. Follow-up queries for deeper analysis 7. Visualization suggestion for the output
💡 Tip: Replace all [bracketed text] with your specific details before pasting into your AI model.
AI Model Compatibility
ChatGPT (GPT-4)
/5 compatibility
Claude
5/5 compatibility
Gemini
4/5 compatibility
Tags
sqldata-analysisquerying
More Data & Analytics Prompts
View all →Intermediate
Executive Dashboard Designer
Design an executive dashboard with the right KPIs.
Intermediate
Data Storytelling Presentation
Transform data analysis into a compelling narrative presentation.
Intermediate
Automated Report Template Designer
Design a recurring business report template.
Advanced
A/B Test Results Analysis Framework
Analyze A/B test results with statistical rigor.