SQL & Databases·Querying data

Intro and SELECT

Understand tables, rows and columns, then retrieve exactly what you need.

Beginner 11 min read Lesson 1 of 480 Challenge included
What you will be able to do
  • Explain relational structure
  • Select columns
  • Alias output

A relational database stores data in tables. Each row is a record; each column has a name and a type. SQL is the language you use to ask questions.

catalog.sqlSQL
SELECT title, level, minutes
FROM lessons
WHERE course_slug = 'html'
ORDER BY minutes DESC
LIMIT 5;
ClauseJob
SELECTChoose the columns to return.
FROMName the table(s).
WHEREFilter rows.
ORDER BYSort the result.
LIMITCap the number of rows.
Your turn

List beginner courses

Easy

Return title and level from courses where level is "Beginner".

SQL · starter
SELECT
FROM courses
WHERE
Check your understanding before moving on.
Knowledge checkQuestion 1

Which clause filters rows?

Select an answer to continue
Study tools

Make it yours.

Keep a private note for this lesson, then turn the key ideas into flashcards you can revisit.

Sign in to save notes and flashcards.Both are private to your account and stay with your progress.
Sign in
Finished reading?

Lock in what you just learned.

Mark this lesson complete to save your place and move one step closer to the certificate.

Next: Filtering and sorting
Lesson 1 of 480 · 0% of course