Learn with Abdou

Chapter 2 · Concept 2 of 6 · Practice

Name the result

aliases, expressions and text labels · level 1 of 6

Opening your saved work…

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

Name the result · aliases, expressions and text labels · level 1 of 6

A heading and a calculation

Level 1: Watch it answered · Exercise 1 of 2

The recap editor wants the speaker column headed speaker, and a word budget five words bigger than each line. Watch the query do both, then run it.

Data: Rick & Morty.

Why it works, clause by clause

  1. characterName AS speaker: the stored column, with a new heading for this result only.
  2. wordCount + 5 AS five_more_words: an expression, calculated for every row, with its own heading.
  3. id stays in the list so you can check each calculation against the stored line.
  4. ORDER BY id, LIMIT 3: a repeatable three-row preview.

From the reading: Name the result, paragraph 2

The queryOpening the database…
SELECT id, characterName AS speaker, wordCount + 5 AS five_more_words
FROM scripts
ORDER BY id
LIMIT 3;
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.