🟢 The 5-Minute Query I Run Before I Touch a New Database (Full Query Included)


Quick note: Before you read this week's newsletter, can you fill out this 5-minute subscriber survey so I know what you want to know more about? I've got a mix of SQL and AI & Agentic Analytics right now. Thanks in advance!

Hello Reader,

A manager sends you a database login and says, "Can you pull a few customer insights before Friday."

You connect to the database and you pause:

Because, as a business analyst, there are two ways to respond:

  1. Panic and start feverishly writing the SQL, joining random tables the MIGHT be relevant
  2. Use the Mister Rogers Blueprint (see below)

Before the JOIN, have a conversation with the data.

  • Who's in here?
  • What details do I have?
  • Which groups might need different treatment?

That's the job of The Mister Rogers Blueprint: approach an unfamiliar dataset with curiosity not panic.

A five-minute first pass

  1. Repeat the question in plain English. "A few customer insights" = tossed over the wall to you.
  2. Pick the one table closest to the request. For customer insights, that's customers. Ignore everything else (for now).
  3. Pick a reasonable field to group by to help with at least ONE decision.

To show you what I mean, I opened the live database for Summit Adventures, the fake adventure tourism company I created to help people learn business analytics.

The first useful query

The example here is simple, but definitely real-world.

It groups customers by experience level, then adds two pieces of context:

  • who agreed to marketing
  • and who has a dietary note on file

You see this kind of thing every day as a business analyst.

SELECT
    experience_level,
    COUNT(*) AS customers,
    COUNT(*) FILTER (WHERE marketing_opt_in) AS opted_in_customers,
    COUNT(dietary_restrictions) AS customers_with_dietary_notes
FROM customers
GROUP BY experience_level
ORDER BY experience_level;

Not ready to inform a decision, but it's a first useful description of the customer base:

  • Balanced audience. Customers spread evenly across four experience levels.
  • Customer permission. Summit can contact every one of them.
  • Dietary needs are substantial. Every segment has them, so this is an operating requirement, not a rare exception.

Experience level is a natural starting point for how Summit describes a trip, what prep it highlights, and which questions it anticipates. These basic insights can inform marketing decisions.

The dietary column adds a second lesson. A field doesn't have to be the headline metric to matter. Operations needs it to plan meals. Marketing can use it to make an offer feel more relevant. Guides need it before an expedition begins.

One field, three different operational teams for Summit Adventures.

Let this initial result drive the next question

A common habit is to see a few column names and immediately try to calculate revenue. That's valid when it matches the request. It's not the only path.

Here, the next questions might be:

  1. Which experience levels are booking which trip difficulties?
  2. Do customers with dietary notes choose different expedition types?
  3. Which opted-in customers haven't booked yet?

We started with a vague request.

One small query gave us three business questions a real team could sit down and discuss.

Keep the first query small

  • Don't join tables because they exist. Stay with one table until you know what a second one would add.
  • Don't treat every column as a metric. A dietary note is operational context...not a business driveer.
  • Don't skip the follow-up question. This first pass should direct where you go next -- keep going to strike gold!

When to use this

Try The Mister Rogers Blueprint the next time you inherit a spreadsheet, a SaaS export, or a database that's new to you:

  1. Pick one table that's likely to matter.
  2. Group by a field that represents a meaningful business segment.
  3. Add one or two related fields that could change the interpretation.
  4. Write down the next question before you write the next query.

The same approach works outside SQL. In a spreadsheet, make a pivot table. In a dashboard, filter to one segment.

The tools will change, but it's the thinking and mindset that matters here (curiosity!)

This Week's Action Item

Pick one table or spreadsheet you haven't explored recently.

  • Write one query, or build one pivot table, that groups records by a business-relevant category.
  • Before you move on, write down two follow-up questions the result suggests.

Until next time,

Brian

Brian Graves, creator of Analytics in Action

Say 👋 on X/Twitter, LinkedIn, or book a call with me. You can always reply to these emails. I check them all.

Starting With Data

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.

Read more from Starting With Data

Hello Reader, This week's newsletter is different. No SQL code. No database queries. I lead a team of 30 data professionals, and we use tools like Claude and Copilot to get oriented, draft, review, and explain routine analysis. The useful part is moving faster without handing over the judgment your team relies on. We call this "human in the loop". Agentic Analytics means using AI as part of your analytical process: give it context, check its work, and keep responsibility for the decision. I...

Hello Reader, Real quick: if you haven't completed this subscriber survey -- now's your chance. Most people are looking to learn more about Agentic Analytics and AI topics. I want to build something that would be useful to you, based on the work I've been doing for the past year or so. Interested? Take 5 minutes to let me know what's on your mind. Take the 5-Minute Survey Now 👉 Imagine it's your first week at a new job. Someone from IT sends over database credentials and a two-line email:...

Hello Reader, Happy 4th of July to my fellow Americans -- glad you're with me today. 🎇 I'm planning out newsletters for the rest of the year and want to start incorporating more Python, Tableau, and Agentic Analytics. Can you take this short survey for me? Thanks! If you've been working as an analyst, you'll be familiar with a request like this: "This weekly report is exactly what we needed. Can we get it every Monday morning, with a chart, emailed to the whole leadership team automatically?"...