📈 Data Analysis Prompts
SQL queries, data cleaning, visualization, insights
← All Categories
1 prompts
in SQL Analytics
SQL for Business Intelligence
Write SQL queries for a business intelligence dashboard. Tables: orders, customers, products, categories. Generate queries for: 1) Daily/weekly/monthly revenue with date truncation, 2) Customer cohort analysis (retention by signup month), 3) Product affinity (frequently bought together), 4) Customer lifetime value (CLV), 5) Churn analysis (inactive customers), 6) Year-over-year growth comparison, 7) Moving average of sales (7-day, 30-day). Use window functions where appropriate.
💡 Use CTEs for readability. Break complex queries into logical steps.