Cleaning Messy Data in SQL: The Patterns You Will Use Every Week

Nobody warns you about this part. You learn joins, you learn aggregation, you land a job, and then you discover that the field called district contains “Pune”, “pune”, ” Pune “, “PUNE”, “Pune ” and “Punr”. And a number. And, for reasons nobody can explain, the word “test”. Cleaning data is the majority of analytics … Read more

How to Fix a Slow SQL Query: A Practical Guide for Data Analysts

There is a specific kind of silence that happens when you run a query in front of someone. The spinner turns. You start talking to fill the gap. You mention that the table is quite large. Two minutes later you are apologising. Most slow queries are not slow because the database is weak or because … Read more

SQL Window Functions: The Thing That Separates Beginner Queries From Analyst Queries

There is a moment in most analysts’ careers where they stop writing SQL that works and start writing SQL that is good. For a lot of people, that moment is window functions. Before you learn them, certain problems feel genuinely impossible in SQL. Rank each salesperson within their region. Show each month alongside the previous … Read more

Automating the Report Nobody Wants To Run: A Practical Guide

There is a specific kind of Monday morning misery familiar to anyone who has worked in analytics. Open the laptop, run four queries, paste the results into a spreadsheet, fix the formatting because the date column came through as text again, write a short email, attach the file, send. Forty minutes. Every week. Forever. The … Read more