sign up today

Ready to Go Pro with Maven Analytics

Ready to Go Pro with Maven Analytics

Sign up today an unlock full access to all data and AI learning content.

free email course

SQL with AI

Day 2

Beginner

free email course

SQL with AI

Day 2

Beginner

The Brief

Welcome back, it's John at Maven Analytics here again!

Yesterday you got your first data snapshot and discovered something Sarah didn't expect: the UK might not actually be Apex Retail's biggest market by revenue.

That's a perfect example of what good analysis does, it challenges assumptions before they become bad decisions. Today we answer Sarah's first real question.

The brief

Sarah walks over: "Before the leadership meeting, I need to know what's actually driving revenue. Which categories are performing, and which aren't?"

This is the most common business question a data analyst hears. The answer lives in GROUP BY. And most beginners misunderstand it, which is exactly what we're fixing today.

If you’ve ever used a Pivot Table in Excel, this will seem really familiar (and probably easier than you expected).

What GROUP BY actually does

Think of your 30-row orders table. Every row is one order. But Sarah doesn't want 30 rows, she wants one number per category. That's what GROUP BY does: it collapses rows that share a value into a single summary row, then lets you calculate a total, count, or average for each group.

The point is not to know this definition by heart. The point is to be able to look at a business question, "what's driving revenue by category?", and immediately know that GROUP BY category is the answer.

Environment Setup

Environment Setup

exercise 1

Revenue by category

5 min

exercise 1

Revenue by category

5 min

exercise 2

The follow-up that changes the story

5 min

exercise 2

The follow-up that changes the story

5 min

exercise 3

Look at it from a different angle

5 min

exercise 3

Look at it from a different angle

5 min

Go Deeper

Go Deeper

Looking forward to Tomorrow

Looking forward to Tomorrow

© Maven Analytics, LLC | All Rights Reserved

© Maven Analytics, LLC | All Rights Reserved

© Maven Analytics, LLC | All Rights Reserved