A select list mixes aggregates with plain columns and the query has no GROUP BY
What it finds
SELECT name, COUNT(*) FROM t without GROUP BY mixes one row of totals with a column that has a value per row: PostgreSQL, SQL Server and Oracle reject it, and MySQL and SQLite return the value of an arbitrary row.
From the rule's source, aggregate_without_group_by.rs.
Turn it on, off or suppress it
The rule runs from the recommended tier up. To turn it on in a lower tier, give it a level in tx0.toml:
[rules]
"tx0/sql:aggregate-without-group-by" = "error"To keep one finding, suppress it with a reason: tx0 suppress ID --reason "..." writes the comment for it.
tx0 explain tx0/sql:aggregate-without-group-by shows the same in the terminal. Found a false positive? Report it.