dave
dave

Reputation: 61

The GROUP BY clause must be used with aggregate functions?

GROUP BY clause need an aggregate ?

Upvotes: 0

Views: 84

Answers (1)

O. Jones
O. Jones

Reputation: 108839

No, an aggregate query doesn't need a GROUP BY clause. But if no such clause is present the query only generates a single result row, aggregating the entire table.

It's sort of like there was an implicit GROUP BY 'nothing' clause inserted by the DBMS if you don't provide your own.

Upvotes: 3

Related Questions