$ whois sql
SQL
first released in 1974 · by Donald D. Chamberlin, Raymond F. Boyce
$ guessprog --inspect sql
- year
- 1974
- paradigm
- declarative
- family
- other
- memory
- automatic gc
- binding
- static
- safety
- strong
SQL(7)
- AUTHORS
- Donald D. Chamberlin, Raymond F. Boyce
- HISTORY
- Donald Chamberlin and Raymond Boyce designed SQL at IBM's San Jose research laboratory in the early 1970s, building on Edgar F. Codd's 1970 relational model of data. It was originally called SEQUEL, the Structured English Query Language, and was meant to let non-programmers query the experimental System R database. The name had to be shortened to SQL because SEQUEL was a trademark of a British aircraft company. SQL became an ANSI standard in 1986, and many people still pronounce it "sequel".
- USAGE
- The universal language for relational databases, used daily by developers, data analysts and data scientists. Practically every database, from PostgreSQL, MySQL and SQLite to cloud data warehouses, speaks a dialect of it.
- SEE ALSO
- SQL on Wikipedia ↗
WITH monthly AS (
SELECT customer_id,
date_trunc('month', ordered_at) AS month,
sum(total) AS spent
FROM orders
GROUP BY customer_id, month
)
SELECT customer_id, month, spent,
rank() OVER (PARTITION BY month ORDER BY spent DESC) AS rnk
FROM monthly
ORDER BY month, rnk;