|
Hey Reader, Quick question: Could a colleague open your most recent SQL query and understand what it does without asking you a single question? If the answer is "probably not," this newsletter is for you. Writing SQL that works is step one. Writing SQL that someone else can read, trust, and maintain — that's the skill that changes how people see your work. Why This Matters More Than You ThinkHere's what I've noticed over 15+ years in analytics: the analysts who get promoted aren't always the ones who write the most complex queries. They're the ones whose work is so clear that other people can build on it. When your analysis is easy to follow:
When it's not: every analysis becomes a bottleneck that requires you to explain it. That limits your impact. Three Documentation Habits That Make a DifferenceHabit 1: Comment the "Why," Not the "What"
The "what" is visible in the code itself. The "why" disappears unless you write it down. Six months later, you'll need the why more than the what. Habit 2: Use CTEs to Tell a StoryCompare these two versions of the same analysis: Version A: One big query
Version B: CTEs with clear steps
Same results. Version B is readable by anyone on your team. Each CTE has a name that describes what it calculates. The comments label each step. A new analyst joining your team can follow the logic without asking you what it does. Habit 3: Name Things for Business UsersColumn names your manager won't understand:
Column names anyone can read:
This takes 10 extra seconds when writing the query and saves 10 minutes every time someone reads it. Including you. A Template for Documented AnalysisHere's a pattern to use for any analysis that might be shared or revisited:
It takes 2 minutes to add this header. That 2-minute investment saves hours of "wait, what does this query do?" conversations. The Speed of TrustA documented query isn't just easier to read. It's easier to trust. When leadership reviews your analysis, clean documentation signals: "This person is thorough. I can rely on their numbers." Messy, uncommented queries signal the opposite — even if the results are correct. This isn't about perfection. It's about building a reputation for clear, reliable work. Over time, that reputation compounds into bigger projects, more visibility, and greater career impact. Start TodayPick your most recent SQL query and apply these three habits:
It won't take long. And the next time someone opens your work, they'll notice the difference. Until next time, Brian P.S. Clear, well-structured queries are a running theme throughout SQL for Business Impact. Every module teaches not just the SQL pattern, but how to structure and present it clearly. It's the difference between writing queries and doing analysis. Check it out at sqlforbusinessimpact.com. P.P.S. What does your team's SQL documentation look like? Are queries well-documented or is everything tribal knowledge? Hit reply — I'm curious how different teams handle this. I read every response. |
Learn to build analytics projects with SQL, Tableau, Excel, and Python. For data analysts looking to level up their career and complete beginners looking to get started. No fluff. No theory. Just step-by-step tutorials anyone can follow.
Hey Reader, Imagine you're presenting a finding to your team: "Customer A spent $4,200 with us." The first question from the room: "Is that a lot?" Most analysts learning SQL don't realize that, without context, the number means nothing. You need comparison. Is the average customer spend $500 or $5,000? Is $4,200 in the top 10% or the middle of the pack? This is the "compared to what?" problem, and subqueries solve it elegantly. Numbers without context don't drive decisions. Executives don't...
Hello Reader, Almost every business question boils down to one of two things: "How many?" (COUNT) "How much?" (SUM) How many customers booked this month? How much revenue did we generate? How many trips were cancelled? How much did we lose? Once you're comfortable with COUNT and SUM, you can answer the majority of questions that come your way (like sales analytics using SQL). Let me show you both patterns using a real business scenario. The Scenario Your operations manager asks: "Give me a...
HeyReader, Most analysts never think to ask: "Why are our customers cancelling?" Everyone looks at bookings. Everyone reports revenue. But the data hiding in your cancelled orders often tells a more important story than your completed ones. And analysts that want to move from beginner to intermediate SQL skill level have an unfair advantage here. Because there's a sequence to work through this kind of problem. That's what we're covering here. At Summit Adventures (the fake adventure tourism...