Back to all posts
September 22, 2026

What Is SQL?

What Is SQL?
Listen to this post
0:00 / 7:11

SQL is the language you use to ask a database a question. That's it. It's a filing cabinet, and SQL is how you say "hand me every customer in Florida who hasn't paid." Here's the whole idea in plain English, no computer science degree required.

I'm writing this one from a library, which is fitting, because SQL is basically a librarian.

If you've ever heard a developer say "let me query the database" and nodded like you knew what that meant, this is for you. By the end you'll actually know. It's simpler than the acronym makes it sound.

First, what a database is

Forget computers for a second. Picture a filing cabinet.

A filing cabinet with three open drawers labeled Customers, Orders and Invoices, each full of neat index cards, with a string connecting a customer card to an order card
A database is a filing cabinet. Each drawer is a table. Each card is a row.

Each drawer holds one kind of thing. One drawer is CUSTOMERS. One is ORDERS. One is INVOICES. Inside every drawer is a stack of index cards, one per item, and every card has the same blanks filled in. A customer card has a name, a phone number, a city. An order card has a date, an amount, and which customer it belongs to.

That's a database. In the real world the drawers are called tables, the cards are called rows, and the blanks on each card are called columns. Your CRM is one of these. Your bank runs on one. Every app on your phone is quietly reading and writing cards in somebody's cabinet.

So what's SQL?

SQL (say it "sequel," or "ess queue ell," people fight about this) stands for Structured Query Language. Drop the word "structured." It's a query language. A language for asking questions.

Here's the thing about a filing cabinet: it's dumb. It just sits there. If you want "every customer in Florida who owes me money," somebody has to go dig through the drawers and pull those cards. SQL is how you tell the computer to do the digging.

A friendly librarian robot pulling exactly one card from a wall of card catalog drawers while a person waits, and behind them a sweaty figure digging through a mountain of loose paper by hand
Left: what SQL does. Right: what you're doing in that spreadsheet.

You write one sentence. The database reads it, goes through millions of cards in a fraction of a second, and hands you back exactly the ones you asked for. That's the whole job. It's a very fast, very literal librarian.

What a SQL sentence actually looks like

Here's a real one. This is not simplified, this is the actual language:

SELECT name, phone FROM customers WHERE state = 'FL'

Read it out loud. It's almost English. "Select the name and phone, from the customers drawer, where the state is Florida." Three parts, every time:

Three blocks in a row: SELECT, what you want. FROM, which drawer. WHERE, which ones.
Every question you'll ever ask a database has this shape.
  • SELECT is what you want off the card. The name? The phone? Everything?
  • FROM is which drawer to open.
  • WHERE is the filter. Which cards qualify.

Want the overdue ones? Add to the filter: WHERE state = 'FL' AND balance > 0. Want them sorted by who owes the most? Tack on ORDER BY balance DESC. It stacks like Lego. You're not programming, you're describing what you want and letting the librarian figure out how to get it.

The part that makes it powerful: connecting drawers

Here's where a filing cabinet beats a spreadsheet, and it's the whole reason databases exist.

Your customer card doesn't list every order they've ever placed. That would be a mess. Instead, each order card just has a little note: "this belongs to customer #4471." The two drawers are separate, but they're linked.

Two simple grids labeled Customers and Orders, with one highlighted customer row tied by a glowing line labeled JOIN to three highlighted order rows
One customer, three orders, one line connecting them. That line is a JOIN.

SQL has a word for pulling from two drawers at once and matching the cards up: JOIN. "Give me every customer AND all their orders, matched together." One sentence. The database goes through both drawers, lines everything up by that little customer number, and hands you the combined result.

That's the thing a spreadsheet can't really do. In Excel you'd be copying and pasting between tabs and praying. In SQL it's one line, and it's right every time, whether you have forty customers or forty million.

Why you should care even if you never type it

Because everything you actually want to know about your business is a SQL question, whether or not anyone says the word.

"Who are my top ten customers this year?" SQL. "How many leads came in from Facebook versus Google last month?" SQL. "Which invoices are more than 30 days late?" SQL. Every dashboard you've ever looked at is just a pretty coat of paint over a handful of these sentences.

That's why, when I built HyppoCRM, the whole thing sits on a real SQL database (Postgres, through Supabase, if you're the type who wants to know). There's no magic. There's a question, asked precisely, answered instantly.

It's also why I get twitchy when someone runs their business on a tool that doesn't have one of these underneath. If your "CRM" is a spreadsheet or an Airtable base, you don't have a filing cabinet. You have a pile of cards on a desk, and every question costs you an afternoon.

How my AI assistant uses it (and the one thing he's not allowed to do)

Here's the most practical example I've got, because I use it every single day.

I have an AI executive assistant named Joe 3.5. I text him from my phone. And a huge chunk of what he does is answer my weird questions about my own business. "Who owes me money right now?" "How many follow-ups do I have due this week?" "What did that camera shop client pay us last quarter?"

He's not guessing. He's not reading a dashboard I made. When I ask, he writes a SQL sentence, runs it against the same filing cabinet HyppoCRM sits on, and reads me back the cards. Same librarian, same drawers, except now I don't have to know the language. I ask in English, he translates to SQL, the database answers, he translates back. That's the whole trick, and it's why he's useful instead of cute.

A friendly assistant robot reading an index card at a wall of filing cabinet drawers, next to a paper shredder wrapped in chains with a padlock, and a keyboard with the DELETE key missing
He can read every card in the cabinet. The shredder is chained shut.

Now the part that matters if you ever build one of these.

SQL isn't just for asking questions. It can also change things. There's an UPDATE sentence that rewrites cards, and there's a DELETE sentence that throws them away. And a DELETE with a sloppy WHERE clause doesn't throw away one card. It throws away the drawer.

So Joe 3.5 is hard-coded to never run a DELETE. Not "told not to." Not "asked nicely in a prompt." It is physically not a thing he can do. Same for anything else destructive, dropping a table, wiping a column, any of it. He can read anything and he can add or update the records I've explicitly allowed. The shredder is chained shut, and he doesn't have the key, and there is no key.

That's not paranoia. That's just what it looks like to let an AI touch a real database responsibly. The model is smart, and it is also occasionally very confidently wrong, and the one place you cannot afford confidently wrong is the sentence that deletes your customers. So you don't give it that sentence. You build the guardrail into the plumbing, not the personality.

The one-paragraph version

A database is a filing cabinet. Tables are drawers, rows are cards, columns are the blanks on each card. SQL is the language for asking the cabinet a question: SELECT what you want, FROM which drawer, WHERE the cards match. JOIN lets you pull from two drawers at once and match them up. Everything you want to know about your business is one of these questions, and the whole reason software feels fast is that a computer can answer them in milliseconds. And if you ever let an AI near the cabinet, take away its DELETE key first.

That's it. That's SQL. You can go back to nodding in meetings, except now it's real.

More in this series: What Is an API?, What Is an SDK?, What Is an API Key?, What Is a .env File?, and What Is a Cron Job? And if you want to see what happens when someone slips a bad SQL sentence past the librarian, read Prompt Injection Isn't New. Meet Its Grandfather, SQL Injection.

Want to talk about what you're building?

Get in touch