SQL

Write an awesome doc for SQL. A very nice and practical one, extracted from SQL official documentation.

View on GitHub

Glossary

# Scalar value
It comes from linear algebra.
We use it to differentiate a single number from a vector or matrix.
Read more .
# Row value
An ordered list of two or more scalar values.
A vector or tuple.
# Composite type
The structure of a row or record.
Essentially just a list of field names and their data types.
Learn more
# Tuple comparison
(x, y) < (a, b) returns true if one the following equation is true:
  • x < a
  • x = a and y < b
There are some gotchas when you have NULL values. Read this for more info.
# Aggregate function
Computes a single result from multiple input rows.