A query MUST have where, group by, having, order by (by a column or by a key of the row), limit, offset and distinct, union, union all, intersect and except of selects of one row type, in, not in, exists and value subqueries, derived tables and common table expressions, and MUST run on SQLite, DuckDB and PostgreSQL through a driver, giving rows of the type named, with the counts and sums that a driver gives as text read as numbers.
Enforced (check): .github: cd commons/data && bun run verify — suite/typed.test.ts: a select with joins (inner, left, right, full, cross), conditions, groups, having, order, limit, offset and distinct gives rows of the type it names, on SQLite, DuckDB and PostgreSQL; an outer join makes the columns of the other side nullable; suite/typed.test.ts: set operations, subqueries (in, not in, exists, a value), common table expressions, derived tables and a table joined to itself under another name run on each engine, and a name used twice in one query is refused
Proved by: data/suite/typed.test.ts
Written in: data/sql/typed/select.ts
Tests: passed: suite/typed.test.ts a select with joins (inner, left, right, full, cross), conditions, groups, having, order, ; passed: suite/typed.test.ts set operations, subqueries (in, not in, exists, a value), common table expressions, derive