Learn with Abdou

Chapter 10 · Concept 5 of 5 · Practice

A sanity query doubles the rate total

two fresh builds, verify.sql, what a matching total proves · level 1 of 6

Opening your saved work…

Sign in to save across devices → · Download your guest work before switching accounts.

A sanity query doubles the rate total · two fresh builds, verify.sql, what a matching total proves · level 1 of 6

The rows two builds must share

Level 1: Watch it answered · Exercise 1 of 1

What should two fresh builds agree on, row for row? Show every loaded item, every column, in id order.

Data: Trail Gear: build rehearsal.

Why it works, clause by clause

  1. Every column, named in table order: the comparison is of values, not of a count.
  2. ORDER BY id: two builds printed in the same order can be compared line by line.
  3. The NULL notes of TG-102 and TG-106 belong to the baseline too. A build that stored empty strings there would print rows that look the same and are not.

From the reading: A matching total is the weakest check, paragraph 4

The queryOpening the database…
SELECT id, serial, type_id, daily_rate, note
FROM items
ORDER BY id;
Open in the playground

Query results

Run it to see the result here.

Run it to see the result here.

Practice here is evidence for you and your instructor, never a grade. Grades live in Canvas.