Lesson 1.1
What Is SQL?
SQL is a practical way to ask structured questions about rows and columns.
SQL is a language for working with tables. A table is organized intocolumns, which describe what each value means, androws, which hold individual records.
A SQL query does not change the original table unless you use commands built for changing data. In these first lessons, queries only read data and return a temporary result.
Pattern
select column_names
from table_nameSchema · Garden ShopTable · customers9 columns · 20 rows
Table · customers
9 columns · 20 rowsOne row per customer. Some customers have no phone on file.
customer_id intfirst_name textlast_name textemail textphone textcity textstate textsignup_date dateis_active bool
Your task
Run the starter query, then change it to show each customer's first name, last name, city, and state.
SQL Workbench
⌘↵ to run·
Expected answer
- Columns: first_name, last_name, city, state.
- Rows: 5 customers.
Related
Lesson
Tables, Rows, and Columns in SQL
Learn the basic shape of relational data.
Lesson
Meet the SQL Workbench
Run queries and read results in the browser.
Lesson
Your First SQL SELECT Statement
Write a first SELECT and read the returned rows.
Lesson
SQL Playground Mission: Map a Dataset
Scout table sizes before writing larger reports.