Learn with Abdou

Chapter 7 · Concept 1 of 6 · Practice

Join on a relationship, not a coincidence

INNER JOIN ON a key · level 5 of 6

Opening your saved work…

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

Join on a relationship, not a coincidence · INNER JOIN ON a key · level 5 of 6

The believable wrong branch

Level 5: Repair it · Exercise 1 of 1

A preview of tools 1 to 8 shows six tools, each with a branch name that looks fine.

This query should show tools 1 to 8 with their owning branch. It runs, returns six rows, and every branch is wrong. Fix the relationship so it returns tool_id, tool_name and owning_branch for the eight tools, ordered by tool id. Then say what the original was pairing.

Finish line: 8 rows · columns tool_id, tool_name, owning_branch · in the order the question gives

Data: Twin Ports Tool Library.

Opening the database…
Table & column names only · ↑ ↓ choose · Tab insert · Esc dismiss

CURRENT DATABASE

Quick schema · Twin Ports Tool Library

Press Esc or click outside to return to your query. PK = primary key · FK = declared foreign key.

This database has no tables yet. Create a table, then reopen the schema to see its columns.

Control Space also opens names. Enter adds a new line. Control or Command Enter runs your query.
Open in the playground

Query results

Run your query to see the result here.

Run your query to see the result here.

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