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

Basic

free email course

SQL with AI

Day 2

Basic

The Brief

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

Yesterday you joined three tables and found that VIP customers are spending the most. Good finding.

But here's something I didn't mention: your INNER JOIN was quietly hiding data.

The problem with INNER JOIN

An INNER JOIN only returns rows where a match exists in both tables. That sounds reasonable, until you realise what it means in practice: if an order has a customer_id that doesn't exist in the customers table, that order is silently dropped from your result.

No error. No warning. The row just disappears. Your revenue total is now wrong, and you have no idea.

This is one of the most common ways analysts produce incorrect results without realising it. The fix is knowing when to use LEFT JOIN instead, and knowing how to check for the problem before it matters.

Environment Setup

Environment Setup

exercise 1

Spot the difference

5 min

exercise 1

Spot the difference

5 min

exercise 2

Find the problem orders

5 min

exercise 2

Find the problem orders

5 min

exercise 3

Find customers who have never ordered

5 min

exercise 3

Find customers who have never ordered

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