Learn with Abdou

LECTURES 1–5 / CLASSROOM SEQUENCE

Foundation studio

Ten investigations, one at a time. Predict the result, run or repair the SQL, and explain what the evidence supports.

Activities 1–8 use Rick & Morty. Activities 9–10 switch to Northshore Coffee for Lab 2 preparation. These are original discussion questions; the official lab questions stay in Canvas.

All lectures →

Opening your saved work…

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

ACTIVITY 1 OF 10 / LECTURE 1 / Interpret

Six rows, six characters?

A teammate calls this result “six different characters.” Run the preview, retain the record id in your own query, and explain what each row actually represents. Would DISTINCT answer the same question?

Current database: Rick & Morty · one dialogue record per scripts row

Read the concept · Know what one row means

Describe the unit of a result and select columns that preserve enough evidence to interpret it.

Start with the observation, not the syntax

In the movie exercise, one row describes a movie. In scripts, one row is a dialogue record. Rick can therefore appear in many rows. Before writing SQL, finish this sentence: “One row in this table represents …”. A familiar name does not make that name a unique identifier.

An id lets you return to the same source record. Selecting only characterName can produce repeated-looking rows even when the underlying records are different. Keep an identifier while investigating; remove it only when the requested report does not need it.

Columns, rows and values do different jobs

SELECT chooses output columns or expressions; FROM chooses the input table. SELECT characterName reads a stored value from each row. SELECT 'characterName' repeats a literal string instead. Both can execute, so an error-free query is not enough evidence of correctness.

Selecting fewer columns normally preserves the number of input rows. DISTINCT is a separate decision: it removes duplicate combinations of every selected value. Adding an id to a DISTINCT query can change its meaning because distinct records may share the same speaker.

Make the claim as narrow as the evidence

A six-row preview is useful for understanding structure. It does not establish the number of characters, the most important character, or the total amount spoken. Explain the result as “six dialogue records” until you have evidence for a broader statement.

Full Lecture 1 →
Run either version, then compare evidence. Explanations are discussed, not automatically graded.
Loading…
Table & column names only · ↑ ↓ choose · Tab insert · Esc dismiss

CURRENT DATABASE

Quick schema · Rick & Morty

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.

Query results

Predict the result, then run your query.

Predict the result, then run your query.

Read-only activity · One statement per run · First 200 rows displayed · Checks compare the complete bounded result, not just this preview.

Explore this query freely in the playground ↗

Your team’s reasoning

Keep record ids or actual error text. A matching result alone does not explain why your query fits the request.

Exit ticket & transfer to the assigned lab

Lab 1 remains the spreadsheet audit. These SQL investigations prepare the foundation sequence and Lab 2; they do not replace either assignment.

Saved on this device in My Work. Classroom view changes the layout, not your SQL or responses. Use Full-screen results when projecting a table.

Instructor timing & discussion guide · sign-in required →