Advanced SQL Recipes to jump start your Analysis
This section is a compendium of Advanced SQL tricks you can customize for your analysis. Not all databases support all of these recipes, we've made a note where applicable.
Even if you're a pro with SQL, we've started out each recipe with a couple of real-life examples. Hope to spark your inspiration!
Here's a list of what we have so far, and we'll be adding to our library over time:
- Calculating Running Total
- Smoothing Data
- Calculations Per Group
- Growth Rates
- Summarizing Data
- Calculating N-tiles (quartiles, deciles and percentiles)
- Calculating Z-Score
- Predicting the Future
- Data Cleansing (aka "Wrangling")
- Comparing Means with Statistical Testing (coming soon!)
- Calculating Median (coming soon!)
- Calculating Exponential Smoothing Coefficients (coming soon!)
- Calculating Rank (coming soon!)
- Calculating n-grams (coming soon!)
- String Parsing (coming soon!)
- Full text search and text mining (coming soon!)
- Calculating Funnel drop-off (coming soon!)
- Calculating Marketing Channel Attribution Coefficients (coming soon!)
- Cohort charts for Retention Analysis (coming soon!)
- JSON document stores (coming soon!)
- EXPLAIN ANALYZE (coming soon!)
- Pivoting and Unpivoting data (coming soon!)
- Intrusion Dection with IP addresses (coming soon!)
- Nested data types (coming soon!)
- GIS/Spatial queries (coming soon!)
- Recursive queries (coming soon!)
- Correlated and Uncorrelated subqueries (coming soon!)
Please reach out with your feedback and suggestions!
You are reading a series of Advanced SQL tricks.
Read this next: Calculating Running Total
Join 200+ data analysts who are using our weekly SQL tips to improve their skills. No spam, promise!