Stockertim Dictionary · Technology
SQL
Also called Structured Query Language
In short
Structured Query Language: the standard language for asking a relational database to select, filter, join, group and summarise rows of data.
- Advanced
- Acronym
- Checked
In detail
SQL is how people and programs talk to relational databases, which store information in tables of rows and columns. A query describes the result wanted rather than the steps to compute it: these columns, from this table, where these conditions hold, grouped and sorted in this way. The database engine then works out an efficient plan. The core clauses are SELECT, FROM, WHERE, GROUP BY, ORDER BY and JOIN, with INSERT, UPDATE and DELETE for changing data.
For financial data, SQL handles jobs that become slow or fragile in spreadsheets: listing every day a share moved more than 5%, totalling trades by client and month, or matching a price table against a table of dividends and splits. Window functions extend it to calculations across related rows, such as day-to-day returns or running averages, without losing the detail of each row.
The language is an international standard, yet each database product adds its own dialect, so date handling and some functions differ between systems. Queries are plain text, which means they can be saved, reviewed and rerun, a help for audit trails. The weakness is security: an application that pastes user input straight into a query invites SQL injection, so well-built systems pass values as separate parameters.
Worked example
A table called prices has the columns ticker, trade_date and close.
- Query: SELECT ticker, AVG(close) FROM prices WHERE trade_date in October GROUP BY ticker
- For Harbour Bank, with three October closes, the average is (40 + 42 + 44) / 3 = 42
One query returns an October average for every ticker in the table at once.
In practice
Banks, exchanges, regulators and fintech firms hold transaction and market data in SQL databases, and analysts in Lagos, London and New York use the language daily to pull figures for reports. Many dashboard tools turn clicks into SQL behind the scenes.
Watch out
- NULL in SQL means unknown, and comparisons with it are neither true nor false, so rows can vanish from filters.
- Joining on a column that is not unique multiplies rows and inflates totals.
Learn it properly
- Lab 4: SQL on a price table15 min lesson Free course: Financial Data Lab
- Natural-language questions and SQL15 min lesson Free course: AI for data analysis: spreadsheets and BI
- SQL basics: SELECT, WHERE and ORDER BY15 min lesson Free course: Data skills: SQL and Python basics
- Joining tables: SQL JOIN for beginners15 min lesson Free course: Data skills: SQL and Python basics
- pandas basics and a first chart15 min lesson Free course: Data skills: SQL and Python basics
Official sources
- API technical and data standards · Government Digital Service
- The Government Data Quality Framework · UK Government Data Quality Hub
Facts last checked on 4 November 2026.
Education, not advice: the Stockertim Dictionary explains what terms mean. It never recommends buying or selling anything.