Learning Objectives:
- SQL Data Extraction: Write complex queries to extract and transform customer data from multiple tables
- Exploratory Data Analysis: Identify patterns, correlations, and anomalies in customer behavior
- Feature Engineering: Create meaningful features like RFM scores, engagement metrics, and cohort analysis
- Statistical Analysis: Apply hypothesis testing and confidence intervals to validate findings
- Data Visualization: Create compelling charts and dashboards to communicate insights
Dataset Configuration
Visualization Settings
SQL Query Editor - PostgreSQL 15
| customer_id | customer_name | total_orders | lifetime_value | days_since_order | churn_risk |
|---|---|---|---|---|---|
| C-10234 | John Smith | 12 | $2,456.89 | 145 | High Risk |
| C-10567 | Sarah Johnson | 8 | $1,234.50 | 98 | High Risk |
| C-10891 | Mike Davis | 25 | $5,678.25 | 72 | Medium Risk |
| C-11023 | Emily Chen | 45 | $12,345.00 | 15 | Low Risk |
Pro Tips & Hints
- RFM Analysis: Calculate Recency, Frequency, and Monetary scores to segment customers effectively
- Cohort Analysis: Group customers by signup month to track retention over time
- Window Functions: Use LAG() and LEAD() to compare customer behavior over time periods
- CTEs: Use Common Table Expressions for cleaner, more readable complex queries
Data Science Lab Complete! Skills Mastered:
SQL Analytics
Complex queries, aggregations, and window functions
Customer Segmentation
RFM analysis and churn prediction modeling
Data Visualization
Creating insightful charts and dashboards
Business Intelligence
Translating data into actionable insights