What is SQL? How to ask a database a question
You don't need to be a programmer to ask a database a question. Here's what SQL is, where you already use it, and your first query, right in this page.
Christophe, founder of Lurndo
· 6 min read
SQL (Structured Query Language) is the standard language for asking a database for data and changing it. You describe what you want to see, such as every coffee under £15, and the database works out how to find it. SQL dates from 1974, is an ISO standard, and is the third most used language among developers.

What does SQL stand for?
SQL stands for Structured Query Language: a language for asking a database questions, called queries. IBM researchers Donald Chamberlin and Raymond Boyce described it in 1974, under the name SEQUEL, and from the start they had more than programmers in mind. It was meant for "the more infrequent data base user" too: anyone who now and then needs to look something up (IBM Research).
What followed is one of the most stable stories in computing. In 1979 the company now called Oracle shipped the first commercial SQL database. SQL became an American standard in 1986 and an international one a year later, and the latest version of that ISO standard is from 2023. What you learn today already worked in the eighties, and it will still be around in ten years.
- 1970Edgar Codd describes the relational model, with data in tables
- 1974Chamberlin and Boyce publish SEQUEL, the forerunner of SQL
- 1979First commercial SQL database (Relational Software, now Oracle)
- 1986SQL becomes an ANSI standard
- 1987ISO 9075, the first international SQL standard
- 2023SQL:2023, the current version of the standard
Source: IBM, Oracle and ISO
What does a database actually do?
A relational database keeps data in tables: rows and columns, like a spreadsheet that never fills up and where nobody overwrites a cell by accident. Each row is one thing (a customer, a product, an order) and each column one property of it. Here's the product table of Bean & Co., a coffee roastery in Bristol and the first client in our SQL course:
| id | name | origin | price | stock |
|---|---|---|---|---|
| 1 | House Blend | Brazil | 12.50 | 40 |
| 2 | Ethiopia Yirgacheffe | Ethiopia | 16.90 | 18 |
| 3 | Colombia Huila | Colombia | 14.75 | 25 |
| 4 | Espresso Forte | Vietnam | 11.95 | 0 |
| 9 | Kenya AA | Kenya | 18.40 | 7 |
The real table has a few more rows, but the idea holds: the data lives in one place, neatly in columns. With SQL you ask for what you need without changing the table itself. To see how tables fit together, start with what a table is.
Your first query: how to read SQL
A query is made of a few words that read almost like an English sentence. SELECT says which columns you want, FROM which table, and WHERE which rows to keep. The order is fixed, which makes SQL predictable: once you can read one query, you can read them all.
SELECT name, price
FROM products
WHERE stock > 0;Read it aloud: "Select the name and the price, from the products, where the stock is greater than zero." The result is a table again, with every product still for sale. Espresso Forte drops out, because there are none left. Now try it yourself, on Bean & Co.'s real data.
Try it: which coffee is running out?
Bean & Co. wants to know which products are almost gone. Show the name and the stock of every product with a stock below 10.
The query you just ran didn't go to a server somewhere far away. It ran in your own browser. Lurndo uses SQLite for that, the same database that's in your phone, and checks your answer on its result: every correct query counts, even if it looks different from ours.
Why is SQL called a declarative language?
In most programming languages you write step by step how the computer should do something: start at the first row, look at the stock, keep the row if it's low enough, move to the next one. In SQL you only write what you want: the products with a stock below 10. How the database finds them, and in which order, is up to the database.
That's more than a detail. Because you describe the result, the same query keeps working when the table grows from twelve rows to twelve million. And because the result is what counts, there's often more than one right way to ask. If you know Excel, you'll recognise this: a filter is also a description of what you want to see. From Excel to SQL shows how filters, pivot tables and VLOOKUP translate to SQL.
Where is SQL used?
SQL is in more places than you'd think. According to its makers, SQLite, the small database that also runs in this course, is on every Android device, every iPhone, every Mac, every Windows 10 and 11 installation, and in Firefox, Chrome and Safari. They estimate that over one trillion SQLite databases are in use (SQLite). Your contacts, your messages and your browsing history often sit in a table.
For people who work with data, SQL isn't niche either. In the Stack Overflow Developer Survey 2025, with over 49,000 responses from 177 countries, 58.6% of respondents use SQL. Only JavaScript and HTML/CSS are used more, and among professional developers it rises to 61.3% (Stack Overflow).
- JavaScript66%
- HTML/CSS61.9%
- SQL58.6%
- Python57.9%
- Bash/Shell48.7%
- TypeScript43.6%
Source: Stack Overflow Developer Survey 2025, all respondents
Still, SQL isn't only for developers. Data analysts, accountants, marketers and researchers use it to pull their own numbers instead of waiting for an export. The US Bureau of Labor Statistics names it outright: database administrators and architects "need an understanding of database languages, such as Structured Query Language, or SQL" (BLS). And if you can read a query, it helps in an ordinary office job too.
SQL vs MySQL, PostgreSQL and SQLite: what's the difference?
SQL is the language. MySQL, PostgreSQL, SQL Server and SQLite are programs that speak it, each with a few words of its own. Think of British and American English: you always understand each other, even if one says "mobile" and the other "cell phone".
| System | Where you'll meet it | What stands out |
|---|---|---|
| SQLite | In apps, browsers and phones | One file, no server needed |
| MySQL | Websites and web shops | Long the default for the web |
| PostgreSQL | Companies and start-ups | Strict and feature-rich |
| SQL Server | Companies on Microsoft | Often next to Excel and Power BI |
No system follows the standard completely. Even PostgreSQL, which comes close, says that no database system fully meets the core of SQL:2023 (PostgreSQL). When you're starting out, that hardly matters: SELECT, WHERE, GROUP BY and JOIN work the same everywhere. Where systems differ, as with LIMIT or date functions, the lessons say so.
Is SQL hard to learn?
SQL is one of the most approachable languages there is, because five words already let you ask real questions. It only gets tricky in the details: text in quotes, AND and OR working together differently than you'd expect, or = NULL never matching anything. You learn those best by running into them yourself, on data you can see.
That's why every lesson in our course starts with an explanation on a real table and then has you write queries, which we check on their result. Start with your first SELECT, filter with WHERE next, or see on learn SQL for beginners how the modules build on each other. The first three modules are free.
Frequently asked questions
What does SQL stand for?
SQL stands for Structured Query Language, a language for asking a database questions (queries). You'll hear it said as "S-Q-L" and as "sequel", after its first name, SEQUEL, from 1974. Both are fine at work.
Is SQL a programming language?
Not in the usual sense. You don't build apps or websites with SQL; you describe the data you want. It's a query language for databases. That's why people who have never programmed pick it up quickly, and why programmers use it next to their own language.
What is the difference between SQL and MySQL?
SQL is the language; MySQL is a database program that speaks it, just like PostgreSQL, SQL Server and SQLite. They follow the same standard, each with some extras of its own. If you know SQL, you can work with any of them.
Do I need to know how to code to learn SQL?
No. A query reads almost like an English sentence, such as SELECT name FROM customers. If you use filters and pivot tables in Excel, a lot will feel familiar. Start with what a table is and you'll write your first query within minutes.
Is SQL still worth learning now that AI writes queries?
Yes. An AI assistant writes a query quickly, but you need to read whether it's right. A missing WHERE or a wrong JOIN gives an answer that looks believable and is still wrong. If you can read SQL, you see that at once.
Practise this in the course
Every lesson explains first and then lets you practise yourself, with a real database in your browser.
- TablesFirst day · What is a table?
- SELECTFirst day · Picking one column
- WHERESecond day · Filtering rows with WHERE
Sources
- Stack Overflow, Stack Overflow Developer Survey 2025, Technology (2025)
- IBM Research (Chamberlin and Boyce), SEQUEL: A Structured English Query Language (1974)
- IBM, The relational database
- Oracle, History of SQL
- ISO, ISO 9075:1987, Database language SQL (1987-06)
- ISO, ISO/IEC 9075-1:2023 (2023-06)
- PostgreSQL, SQL Conformance
- SQLite, Most Widely Deployed and Used Database Engine (2026-04-21)
- US Bureau of Labor Statistics, Database Administrators and Architects, Occupational Outlook Handbook
Christophe, founder of Lurndo
Christophe builds Lurndo from Belgium, with short, playful exercises for SQL, Excel, HTML & CSS and touch typing that show straight away what your answer does. On this blog, Christophe answers the questions people run into while learning, with sources you can check yourself.
Read next
SQL interview questions for beginners, with answers you can runMost SQL interview tests ask the same handful of questions and set the same traps. Here they are, with the answer, the query and the result on real data, and two you can solve right on this page.SQL · · 13 min read
How to calculate an average in Excel: blanks, zeros, conditions and weighted averagesIt's one function, yet averages go wrong all the time. See how AVERAGE works, what it skips, and how to average without zeros, with a condition or with weights, on real spreadsheets.Excel · · 11 min read