Danny’s Diner SQL Case Study

Business Context: A restaurant needs customer insights to drive loyalty program decisions.
SQL Skills Demonstrated:
- Complex JOINs (LEFT, INNER) across multiple tables
- Window functions (DENSE_RANK, RANK) for ranking and partitioning
- Date-based filtering and aggregations
- CASE statements for conditional logic
- CTEs (Common Table Expressions) for query optimization
- Advanced point calculation logic with business rules
Key Accomplishments:
- Solved 10 core questions covering customer spending, visit frequency, and preferences
- Implemented sophisticated loyalty point system with time-based multipliers
- Created member status indicators with membership timeline analysis
- Generated denormalized views for business intelligence
