SQL solution to the Case Study #1 - Danny's Diner
TASK
Danny owns a cute luttle restaurant that sells his 3 favourite foods: Sushi, Curry and Ramen. Danny wants to use the data to answer a few simple questions about his customers, especially about their visiting patterns, how much money they’ve spent and also which menu items are their favourite. He has provided us with a sample of his overall customer data due to privacy issues - but he hopes that these examples are enough for us to write fully functioning SQL queries to help him answer his questions!
Find the challenge here:
SQL/Snowflake Techniques Used
- Common Table Expressions and multi-key Joins
- Aggregation and column type-conversion
- Queries with constraints
- Filtering and sorting
- CASE Statement
Find my solution in the sql script