Database problems Flashcards
1
Q
The usage of GROUP BY
A
- for selection in one table, the select clause should only contains the field used in GROUP BY clause and aggregation functions: sum, avg, min, max….
- Exception: if there are two or more tables (join), other table’s field used in where clause (for join) can appear in the SELECT clause