SQL
SQL (Structured Query Language) is the standard language for retrieving, adding, changing and deleting data in relational databases. It was created at IBM in the 1970s by Don Chamberlin and Raymond Boyce as part of the System R research project, which put Edgar F. Codd's relational model into practice.[1][2] SQL has been standardized by ANSI in 1986 and by ISO in 1987 and remains the most common standardized language used to access databases.[3][4]
What does SQL mean in simple terms?
SQL is a way of asking a database a precise question. For example, SELECT name FROM customers WHERE signup_date >= '2026-01-01' means "give me the names of every customer who signed up on or after 1 January 2026." The same basic words, such as SELECT, FROM, WHERE and GROUP BY, work across widely used systems such as MySQL, PostgreSQL and Google BigQuery, although each product has its own dialect and extensions.[3][5][6] With read access to a reporting database, marketers and planners can answer many of their own data questions instead of waiting for an engineer. AI assistants can now draft SQL from plain-language questions, but the results still need checking, especially on large, complex company databases.[8]
How can SQL be explained with an analogy?
SQL is like the standard request form at a library desk. Instead of saying "find me something good," you fill in exactly what you want, such as "Korean novels published after 2020," and the librarian brings back only the books that match.
Where is SQL used?
Snowflake Cortex Analyst — Asking business questions without writing SQL
Snowflake's Cortex Analyst lets business users ask questions about structured data in natural language; the service generates SQL that an application or user can execute in Snowflake to obtain an answer.[7] Snowflake notes that general AI tools often struggle when they see only a database schema, so it adds "semantic views" that define business terms, metrics and table relationships to improve accuracy.[7] Generated queries follow the account's existing access controls, and the service can only answer questions that SQL can resolve, not broader questions such as "What trends do you observe?"[7]
Result: Text-to-SQL is offered as a managed feature inside a major data platform, but it depends on well-defined business metadata (Snowflake documentation, checked October 2026).[7]
Text-to-SQL benchmarks — Easy tests versus real company data
On Spider 1.0, a research benchmark of 10,181 questions over 200 databases, GPT-4-based methods reached 86.6% execution accuracy by 2023.[10] Spider 2.0, introduced in November 2024, uses 632 real enterprise workflow tasks on databases that often have more than 1,000 columns and dialects such as BigQuery and Snowflake.[8] In the original paper, an agent based on o1-preview solved only 21.3% of these tasks, compared with 91.2% on Spider 1.0.[8] By October 2026, the public leaderboard listed submitted results for specialized agent systems above 90% on the Spider 2.0-Snow setting, while plain model baselines scored far lower.[9]
Result: Benchmark performance varies by dataset and system; business metadata and validation matter when applying generated SQL to real data.[8][9]
Why SQL has lasted
SQL has stayed in use for decades for three reasons.
First, most major databases speak it. MySQL, PostgreSQL and Google BigQuery all use SQL, so the core skill carries over between products.[3][5][6] Each product still has its own dialect: PostgreSQL, for example, supports at least 170 of the 177 mandatory Core features of SQL:2023, and its documentation notes that no current database claims full Core conformance.[5]
Second, it is relatively easy to read. Queries are written with English keywords such as SELECT, FROM and WHERE, and the relational approach was designed so that people could ask for data without knowing how it is physically stored.[2]
Third, AI has made SQL more accessible. Text-to-SQL tools turn a plain-language question into a query, and data platforms now offer this as a built-in feature.[7][8]
Try it today
- Ask your engineering team for read-only access to a reporting copy of a database, not the live production system.
- Learn four clauses first: SELECT (which columns), FROM (which table), WHERE (which rows) and GROUP BY (how to summarize).
- Write one query that answers a real question, such as orders or sign-ups per month.
- When you ask an AI assistant to write SQL, give it the table and column names and what each one means.[7]
- Check AI-written SQL on a small sample, and compare the result with a figure you already trust before sharing it.[8]
Limits and direction
SQL code is not fully portable: functions, date handling and other details differ between databases, so a query written for one system may need changes for another.[5][6] SQL works best on structured, table-shaped data. Non-relational (NoSQL) databases often use other query methods. Text-to-SQL is improving quickly, but benchmark results show a large gap between simple test databases and messy enterprise data, and products still rely on clear definitions of business terms and on human review.[7][8][9] The likely direction is that people describe what they want in plain language while SQL remains the precise layer underneath that can be checked and reused.
How has SQL evolved?
Which concepts are related to SQL?
- Where it is usedDatabaseSQL is the standard language for relational databases.[3]
- AlternativeNoSQLNon-relational databases often use query methods other than SQL.
Which sources explain SQL?
- IBM — Edgar F. Codd (IBM Heritage, 2025-11-10) — https://www.ibm.com/history/edgar-codd
- IBM — The relational database (IBM Heritage, 2025-11-10) — https://www.ibm.com/history/relational-database
- Oracle — MySQL 8.4 Reference Manual: What is MySQL? — https://dev.mysql.com/doc/refman/8.4/en/what-is-mysql.html
- ISO — ISO 9075:1987 Information processing systems — Database language — SQL (1987-06) — https://www.iso.org/standard/16661.html
- PostgreSQL Global Development Group — Appendix D. SQL Conformance (PostgreSQL 18 documentation) — https://www.postgresql.org/docs/current/features.html
- Google Cloud — Introduction to SQL in BigQuery — https://cloud.google.com/bigquery/docs/introduction-sql
- Snowflake — Cortex Analyst (Snowflake Documentation) — https://docs.snowflake.com/en/user-guide/snowflake-cortex/cortex-analyst
- Lei et al. — Spider 2.0: Evaluating Language Models on Real-World Enterprise Text-to-SQL Workflows (arXiv, 2024-11-12; revised 2025-03-17) — https://arxiv.org/abs/2411.07763
- XLANG Lab — Spider 2.0 benchmark and leaderboard — https://spider2-sql.github.io/
- Yale LILY — Spider 1.0: Yale Semantic Parsing and Text-to-SQL Challenge — https://yale-lily.github.io/spider
Tell us what you think
Your feedback helps us improve the content.