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

Rick in Pilot

Level 1: Watch it answered · Exercise 2 of 2

Each episode-guide card needs one label such as Rick in Pilot. Watch the query build it from two columns and a piece of text, then run it.

Data: Rick & Morty.

Why it works, clause by clause

  1. characterName || ' in ' || episodeName: two columns joined with a piece of text between them. || joins text; + would try to add numbers.
  2. ' in ': the single quotes make it text, spaces included. Without them the engine would look for a column called in.
  3. AS scene_label: one output column, one heading.
  4. ORDER BY id, LIMIT 5: the first five cards.

From the reading: Name the result, paragraph 3

The queryOpening the database…
SELECT characterName || ' in ' || episodeName AS scene_label
FROM scripts
ORDER BY id
LIMIT 5;
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.