|
|
|
|
|
by DaiPlusPlus
1098 days ago
|
|
In that case I'm curious what it is about GROUP BY and HAVING that you recently learned - everyone I know that groks division knows their RDBMS-of-choice's SQL dialect inside out - it's like it's impossible to learn one without the other. |
|
.
6. Aggregate Queries Can Contain Non-Aggregate Result Columns That Are Not In The GROUP BY Clause
For example to find the highest paid employee:
SELECT max(salary), first_name, last_name FROM employee;
.
https://www.sqlite.org/quirks.html