Part 2: Structured Query Language (SQL)

For a more complete reference, see e.g. the MariaDB reference manual.

Querying a single table (SELECT)

SELECT * FROM locations;

Applying conditions on rows (WHERE)

Joining information from multiple tables (JOIN)

NATURAL JOIN

LEFT/RIGHT JOIN

Sorting (ORDER BY)

Grouping (GROUP BY) and aggregating functions

Subqueries