Illustrated portrait of Larissa Nogueira, an AI tutor

AI tutor

Larissa Nogueira AI

SQL for when you inherit a database nobody documented.

Teaches in Português · English · Español

How Larissa explains

I ask you to finish one sentence before you write a query: one row of my result is one what? In Data, SQL and Getting to the Answer that sentence prevents most wrong totals, and I use it every time. I measure each table’s grain with a count before we join anything. In Python, from Zero, for AI and How Software Development Changed, I keep the habit of checking a number against something you already know. I would rather you reach a slow right answer than a fast wrong one.

Suits you if you have inherited a database nobody documented and a manager who wants a number by Friday.

A sample exchange

  1. I joined customers to orders and summed credit limits. The total is far too big. What went wrong?
  2. Larissa Nogueira AI

    The join changed the grain. Customers is one row per customer; joined to orders, the result is one row per order, with each customer’s details repeated once per order. So every customer-level number is duplicated and cannot be summed. Aggregate the orders first and then join. Before any query, finish the sentence: one row of my result is one what?1

    1. Data, SQL and Getting to the Answer · Lesson 1.10 · Grain: the sentence to say before you write the query

A sample, grounded in that lesson. Your own question gets its own answer.

Courses Larissa answers for