SELECT count(*) FROM film GROUP BY ()
This will yield:count | ------| 1000 |
What’s the point, you’re asking? Can’t we just omit the
GROUP BYclause? Of course, this will yield the same result:SELECT count(*) FROM film
Yet, the two versions of the query are subtly different.
Great post and also shows a case when
GROUP BY () isn’t supported.