## Rubber Duck

__

### 01\. Introduction

## SQL

Welcome to the first SQL chapter! 🤩

**SQL** (short for **S**tructured **Q**uery **L**anguage) is a programming language designed to manage and retrieve data stored in databases.

It’s a staple in both Data Science and Web Dev.

**Fun fact:** SQL was developed at IBM in the 70s and named SEQUEL ( **S**tructured **E**nglish **Que**ry **L**anguage); you can call it “S-Q-L” or “sequel.”

SQL databases are collections of tables, with rows and columns.

In this chapter, we will use a table called `shows` with data about popular TV shows. 📺

It looks something like this:

| id | name              | genre   | stream | year | seasons | tomatometer |
|----|-------------------|---------|--------|------|---------|-------------|
| 1  | Silicon Valley    | Sitcom  | HBO    | 2014 | 6       | 8.5         |
| 2  | The Last of Us    | Horror  | HBO    | 2023 | 1       | 8.7         |
| 3  | Squid Game        | Thriller| Netflix| 2021 | 1       | 8.0         |

There are seven columns: `id`, `name`, `genre`, `stream`, `year`, `seasons`, and `tomatometer`.

SQL statements, or **queries**, are instructions that the database understands. In other words, queries allow us to retrieve information from a database.

Let’s test out a query real quick. 🙌

### Instructions

Copy and paste the following statement:

```sql
SELECT * FROM shows;
```

Then press the "Run" button and wait 1-2 seconds.

You should see the `shows` table appear. See if you recognize any of the shows!

Press "Mark complete" and then "Next" to continue.

Happy coding! ⋆౨ৎ˚⟡˖ ࣪

### Help

Don’t worry! In this exercise, you don't have to know what's happening with the code. You can copy and paste for now.

After pressing the "Run" button, you should see a list of results in a table rendered in the output.

There should be 50 rows of data in `shows`.

### Hint

Don’t worry! In this exercise, you don't have to know what's happening with the code. You can copy and paste for now.

After pressing the "Run" button, you should see a list of results in a table rendered in the output.

There should be 50 rows of data in `shows`.

### Solution

AI coding companion

Still want help? Get live help from other learners in our Discord.

# New Item Unlocked!

Rubber Duck

Rubber duck debugging is a classic technique used by developers to debug code. By explaining the code line-by-line to a rubber duck, you can break down the code into smaller pieces, and potentially identify the error.

... It's silly, we know.

### New Item Unlocked!

Lumi

👋 I’m Lumi, a coding mentor bot here to answer any questions related to programming, Codédex, projects, and much more.

### New Item Unlocked!

Editor Themes

Congrats! You unlocked Editor Themes. You can now change the theme of the editor to your liking.

query.sql

```sql
-- Write code below 💖
```

Enter to Rename, Shift+Enter to Preview

Run

Submit answer

Output

### FEATURE UNLOCKED!

You have **100 XP**! This means you can now join our On-Platform Community to chat and hang out with fellow learners!

Say hi in the **Introductions** channel. 😊
