Where did SQL come from?
SQL grew out of IBM's work on the relational model. IBM credits Don Chamberlin and Raymond Boyce as co-inventors of Structured Query Language; both were part of the System R project, which began in 1973 [2]. The idea underneath it is Edgar F. Codd's 1970 relational model, in which users ask for information without knowing how it is physically stored [2].
Is there an SQL standard?
Yes. Its formal name is ISO/IEC 9075 "Database Language SQL". The most recent revision appeared in 2023 and is known as SQL:2023; earlier versions were SQL:2016, SQL:2011, SQL:2008, SQL:2006, SQL:2003, SQL:1999 and SQL-92 [1]. Since SQL:1999 the standard has defined a set of Core features every conforming implementation must supply, with the rest optional [1]. It is split into parts, so XML-related specifications and property graph queries, for example, live in separate documents [1].
Real databases do not all follow it to the same degree. The PostgreSQL documentation says it conforms to at least 170 of the 177 mandatory Core features, and notes that no current database management system claims full conformance to Core SQL:2023 [1].
What does a query look like?
This query lists products priced above 100, most expensive first:
SELECT name, price FROM products WHERE price > 100 ORDER BY price DESC;It states what you want, not how to fetch it. The database decides how to find the rows.