Intro to SQL #
This lab introduces Structured Query Language (SQL).
Syllabus Topics [SL] #
- A3.3.1 Outline the differences between data language types within SQL.
- A3.3.2 Construct queries between two tables in SQL.
- A3.3.3 Explain how SQL can be used to update data in a database.
Syllabus Topics [HL] #
- A3.3.4 Construct calculations within a database using SQL’s aggregate functions. (HL only)
Key Vocabulary #
| Word | Definition |
|---|---|
| SQL | Structured Query Language |
| Database | an organized collection of structured information that can be accessed in different ways |
| Table | a structure of rows and columns for storing a group of similar data |
| Field | the column name |
| Data Language Types | languages used to interact with databases |
| Data Definition Language (DDL) | language that is used to create, modify, and remove data structures from a database |
| Data Manipulation Language Language (DML) | language that is used to add, modify, delete, and retrieve data stored in databases |
| Query | to request information from a database |
| Relational Operators | =, >, <, !=, <=, >=, between, in, like, %, IS NULL |
| Filtering | using WHERE |
| Pattern Matching | using like, %, _ |
[0] Learn SQL #
SQL allows you to interact with databases that store tables of information.

💻 Learn SQL at sqlbolt.com
👾 💬 Commands you must knowSL must know the following commands. Although
AVERAGE, COUNT, MAX, MIN, SUMare not mentioned, they are often used in conjunction withGROUP BY. So, we recommend learning all of the commands.SELECT, DISTINCT, FROM, WHERE, BETWEEN, ORDER BY, GROUP BY, HAVING, ASC, DESC, JOIN, LIKE with % wildcard, AND, OR, NOT INSERT INTO, UPDATE SET, DELETEHL must know the following additional commands
AVERAGE, COUNT, MAX, MIN, SUM
[1] SQL Murder Mysteries #

1️⃣🔍💻 Go to sqlnoir.com and create an account. Solve one mystery from each level.
2️⃣🔍💻 Solve a longer mystery at mystery.knightlab.com. Be sure to try the bonus question at the end.
[2] Deliverables #
⚡✨ Once you finish the lab, be sure to complete these two steps:📋 Update Syllabus Checklist: Go to your Syllabus Content Checklist in your Google Drive and update it accordingly.