Spreadsheets are great, CSVs are common, and APIs stream data from everywhere—but when companies need structure, speed, and scale, they often rely on relational databases. These are like powerful digital filing cabinets where data lives in neatly organized tables—rows and columns designed for efficient storage and retrieval.

But these tables don’t do much on their own. To explore them, ask questions, and pull insights, we need a universal language for data: SQL—Structured Query Language.

SQL isn’t a programming language—it’s a declarative language.

SQL is how we talk to relational databases. It’s how we ask for the data we want, filter the noise, and shape results into meaningful answers. Whether you're analyzing employee salaries, tracking customer orders, or prepping data for machine learning models—SQL is a tool you'll reach for again and again.

Fun fact: The first version of SQL was developed at IBM in the 1970s. It originally stood for "Structured English Query Language" (SEQUEL)—which is why some people still pronounce it “sequel” today!

In this lesson, we’ll explore the fundamental building blocks of SQL queries—how to select data, apply filters, and return only what’s relevant.

Sample data: The Employees table

To understand how SQL works, let’s start with a simple example table called employees. It stores information about employees in a company, including their ID, name, department, hire date, and salary.

Get hands-on with 1400+ tech skills courses.